Mysql – Import error from thesql command line

command lineMySQLmysql-5.7

enter image description here

I tried so many ways to restore a sample database (with the command on top of the picture) but i failed every single time. i successfully restored with this command in past. but now i am facing this problem. And when i am putting "\" to specify path, there is an error saying '\s' is not a valid command. You can see it's showing "D:ample.sql" 🙁

Best Answer

look like You try to run mysql(?d) from inside mysql console this command must be run from OS command line:

c:\Program Files\MySQL\bin>mysql -u root -p sample < d:/sample.sql

all from Windows command line