Abdul Ahmad
Abdul Ahmad

Reputation: 10021

can't load .sql file into mysql mac

I have mysql running, I've switched to my database using:

use myDb;

now I'm trying to run a sql script located on my desktop using the following:

source /Users/abdul/Desktop/mySql.sql;

but I keep getting this error:

Failed to open file '/Users/abdul/Desktop/mySql.sql;', error: 2

not sure what I'm doing wrong, I've been researching and everything says to do it the way I did it.

Upvotes: 1

Views: 623

Answers (1)

Sandeep Neupane
Sandeep Neupane

Reputation: 158

Error 2 stands for "No such file or directory". Try checking for any spelling errors in the file. Also make sure MySQL has access to the file in that location.

Upvotes: 1

Related Questions