Method One: Solve garbled problem by adding parameter--default-character-set = UTF8
Method One: Solve garbled problem by adding parameter--default-character-set = UTF8
Mysql-u root-p Password < path_to_import_file--default-character-set = UTF8
Method Two: Import garbled address in command line
Use database_name;
Set names UTF8; (or other required encoding)
SOURCE example.sql (SQL file storage path)
Method Three: Directly paste the code in the SQL file
Open the SQLyog client software;
Navigate to the SQL Editor and open the SQL file you just exported with Notepad;
Copy all the SQL statements in the file into the SQL editor and execute the SQL code;
method Four: Change the encoding format of the SQL file using Notepad or another text tool (If the method is not three, then try Method four)
Use Notepad (or UE) to open the SQL file you just exported;
Save this file--Open the Save As dialog box and select the encoding format for Unicode encoding in the dialog box;
Save the file, then CTRL + A, select all;
Copy the SQL statement inside the SQL encoder in SQLyog and execute the SQL statement again;
After the completion of the implementation remember to refresh, view the Chinese data table, garbled elimination, done;
MySQL import Chinese data garbled four ways to solve