I created a test database on a Windows computer with MySQL 5.7 and filled it with many data records. Now I created a database dump with mysqldump and wanted to import it on my server (Debian Jessie, also MySQL 5.7).
During the import of the dump I received several error messages, which were not helpful. Therefore I looked at the dump file with the nano editor and found out that the content cannot be displayed correctly:
��-^@-^@ ^@M^@y^@S^@Q^@L^@ ^@d^@u^@m^@p^@ ^@1^@0^@.^@1^@3^@ ^@ ^@D^@i^@s^@t^@r^$ ^@ ^@-^@-^@ ^@ ^@-^@-^@ ^@H^@o^@s^@t^@:^@ ^@l^@o^@c^@a^@l^@h^@o^@s^@t^@ ^@ ^@ ^@ ^@D^@a^@t^@a^$ ^@ ...
But if I open the dump under Windows in e.g. Notepad++, everything can be displayed perfectly.
So I thought about an error during the FTP upload. However, if I transfer a file from Windows to Linux and then transfer it back, the new file will still be readable under Windows, but not under Linux.
Can anyone give me a hint? Thanks!
Little update: This is how I made the dump:
.\mysqldump.exe -u root --databases m_data > D:\m_data_dump.sql
Update 2: I also tried exporting with explicit charset:
.\mysqldump.exe -u root --default-character-set=utf8mb4 --databases m_data > D:\m_data_dump.sql
And imprted with:
mysql -u root -p --default-character-set=utf8mb4 < m_data_dump.sql
But sam result.