Today, when I migrated a MySQL database, I always prompted: Unknown command '\ n', and I don't know where the problem is. After countless studies, the problem was solved, the following describes the specific ideas and solutions.
Previously, my MySQL database version was mysql4, And I imported the new database mysql5. I found that there was no problem in importing data between databases of mysql4, and no error message was prompted, however, an error occurred when importing data to mysql5. The solution is as follows:
You can specify the encoding when exporting the MySQL 4 database. The related commands are as follows:
Mysqldump-u root-P dbname -- default-character-set = GBK> D: \ htmer. SQL
Note: The above GBK encoding depends on the actual encoding of your database.
With the preceding export settings, You can import data to the new MySQL database without errors.
Link: http://www.htmer.com/article/874.htm