I am trying to load a script to populate a database. I have created the database and the user, and now I just need to create the tables from the script.
I am using this command from the cmd:
source C:\Temp\filename.sql;
and I either get a message indicating error 2 (that the file cannot be read) or 'No previous outfile available, you must give a file name!'
I have looked over questions relating to this, but have not found a solution.
Please assist, mehmeh
In MySQL, backslash is the escape character. So, in your path, replace backslashes by slashes or double backslashes. This gives
SOURCE C:/Temp/filename.sql;
or
SOURCE C:\\Temp\\filename.sql;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With