In general, when MySQL migrates from Windows to Linux, there are standard tutorials on the Web:
1) Enter the/mysql/bin directory on the Windows platform (assuming your database name is MyData)
Execute the mysqldump command to export your database, with the following specific commands:
Mysqldump-u root-h localhost-p-R c://mydata.txt-b MyData
The result of executing this command is: Generate a text file under c:/
(2) Upload the MyData.txt file to a folder under Linux (if placed under/home/installsoft),
Start MySQL on the Linux platform and execute the./mysql-u root-p command into the MySQL client program
Execute the following command:
Mysql>source/home/installsoft/mydata.txt can successfully complete the migration
But there are a lot of problems with migrating past data, and the main possible reason is that there may be a problem with migrating past character encodings:
The best solution is to now set the character encoding on both sides to the same encoding, and then migrate the database to the past, and set the encoding in the following way:
First look at the character encoding commands: Show variables like ' character% ';
Then compare the character encoding on Windows and Linux in the same, if not consistent, can be resolved with the following MySQL command:
Set character_set_client=gb2312 resolved.
Character_set_client can be replaced by other character sets, gb2312 can also be replaced by other character encodings.
MySQL database under Windows platform Import to Linux platform