Solution to input "Chinese garbled error 1366" in the client that comes with the mysql server:

Background: The MySQL 5.5 server is installed on the local windows machine.

1: Under "C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin", double-click "MySQLInstanceConfig.exe"
2: Reconfigure the mysql database instance by default in turn (be careful not to modify the default character set, that is, keep latin1)
3: After the database instance is successfully reinstalled, then manually modify the system initial configuration file under "C:\Program Files (x86)\MySQL\MySQL Server 5.5": my.ini needs
to be modified manually in 2 places:
[mysql ]
default = latin1-Character-SET -> default = UTF8 SET-Character-
Character-SET = latin1-Server -> Server-Character-SET = UTF8
4. restart mysql service in cmd
to enter: net stop mysql
again Input: net start mysql
5. Go back to mysql's own client again, create a new table, and then insert data containing Chinese for verification
. The verification is successful, and you will find that the previous Chinese garbled characters become "?". Pay attention to this This solution is only effective for newly created tables. What is the previous Chinese version? Garbled

Guess you like

Origin blog.csdn.net/cnroot001/article/details/113045992