mysql

Mysql ERROR at line 1153: Unknown command '\'


I am trying to import a mysqldump file via the command line, but continue to get an error. I dumped the file from my other server using:

mysqldump -u XXX -p database_name > database.sql

Then I try to import the file with:

mysql -u XXX -p database_name < database.sql

It loads a small portion and then gets stuck. The error I receive is:

ERROR at line 1153: Unknown command '\''.

I checked that line in the file with:

awk '{ if (NR==1153) print $0 }' database.sql >> line1153.sql

and it happens to be over 1MB in size, just for that line.

Any ideas what might be going on here?


Solution

  • You have binary blobs in your DB, try adding --hex-blob to your mysqldump statement.