I have this command:
mysql -u #myusername -p #mypasswd MYBASE < c:\user\folderss\myscript.sql
But I get the following error:
Error
unknow command '\U'
unknow command '\m'
unknow command '\D'
unknow command '\L'
For those using a Windows OS, I was able to import a large mysqldump file into my local XAMPP installation using this command in cmd.exe
:
C:\xampp\mysql\bin>mysql -u {DB_USER} -p {DB_NAME} < path/to/file/ab.sql
Also, I just wrote a more detailed answer to another question on MySQL imports, if this is what you're after.
Go to the xampp shell command line and run
mysql -h localhost -u username databasename < dump.sql
You may also need to specify the host. From your statement, it looks like you run on Windows. Try this:
mysql -h localhost -u #myusername -p #mypasswd MYBASE
< c:/user/folderss/myscript.sql
Or
mysql -h localhost -u #myusername -p #mypasswd MYBASE
< "c:\user\folderss\myscript.sql"
mysql -h localhost -u username databasename < dump.sql
It works, try it.
If password is blank no need to add the -p
args.
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