omrakhur
omrakhur

Reputation: 1402

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:

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. How do I import it then? I want to to import the data only

Upvotes: 0

Views: 182

Answers (1)

Cyclonecode
Cyclonecode

Reputation: 30081

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

Upvotes: 1

Related Questions