Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
689 views
in Technique[技术] by (71.8m points)

mysqldump - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...