Wessi
Wessi

Reputation: 1802

Import mysql dump in mysql workbench on Windows 10

I'm trying to import and open a connection to mysql on my local computer. I have made an sql dump called frontend.sql

I did the following in mySQL workbench query:

CREATE DATABASE frontend;

USE frontend;

These queries were successful. Then I did

SOURCE "C:\Users\John\Downloads\frontend.sql";

Which gives the following error code: Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SOURCE C:\Users\John\Downloads\frontend.sql' at line 1

How do I import the database?

Upvotes: 0

Views: 1087

Answers (1)

Cristofor
Cristofor

Reputation: 2097

You open a console where you can execute mysql

then hit this:

mysql -u username -p frontend < C:\Users\John\Downloads\frontend.sql

Upvotes: 1

Related Questions