How to dump data without loss of '?
My box is centos 5.5 and mysql 5.0.28.
I have a problem in dumping data which omitted ' at sql.
This is my backup command.
mysqldump -u -p --default-character-set=latin1 db > db_backup.sql
And open db_backup.sql at Emeditor and changed charset code to UTF8 and saved as db_backup_utf8.sql. Then restored this sql with this command.
mysql -u -p --default-character-set=utf8 db < db_backup_utf8.sql
I got this error message continously.
ERROR 1064 (42000) at line 24012: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Mozilla/4.0 (compatible' at line 1
I opened the error line, that part of data is this.
?,'','',0,0,'',773,0,0,
So Iadded ' like this.
?','','',0,0,'',773,0,0,
After adding ', this line is passed. But this kind of errors are so many.
Is this backup command's problem?
Or does database have errors?
How can I have complete sql without loss of '?