[英]MySql error when importing dump from linux into windows machine localhost
I get a couple of errors when trying to import a .sql dump file using the following command: 当尝试使用以下命令导入.sql转储文件时,出现几个错误:
mysql -hIP -r -uroot -p db_test < C:\Users\Mark Hur\SQL Dumps\oct.sql;
The errors I get are as follows: 我得到的错误如下:
ERROR:
Unknown command '\U'.
ERROR:
Unknown command '\O'.
ERROR:
Unknown command '\P'.
ERROR:
Unknown command '\D'.
ERROR:
Unknown command '\S'.
ERROR:
Unknown command '\o'.
I guess these are due to the fact that I received a .sql dump from a database that resides on a linux machine. 我猜这些是由于我从Linux机器上的数据库接收到一个.sql转储而导致的。 How do I import it then?
那我该如何导入呢? I want to to import the data only
我只想导入数据
Since you are using a long filename with spaces it needs to be quoted: 由于您使用带空格的长文件名,因此需要用引号引起来:
mysql -hIP -r -uroot -p db_test < "C:\Users\Mark Hur\SQL Dumps\oct.sql"
Reference : 参考 :
Long Filenames or Paths with Spaces Require Quotation Marks 长文件名或带空格的路径需要引号
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.