Home >Database >Mysql Tutorial >What should I do if mysql cannot display Chinese?
The solution to the problem that mysql cannot display Chinese: First find the installation location of MySQL; then open the "my.ini" file; and finally change "default-character-set=utf8" to "gb2312".
What should I do if mysql cannot display Chinese? Then find a way to Chineseize it. Below I will introduce two methods to you.
Limited to versions 5.6, 8.0 and 5.0
1. Find the installation location of MySQL. For example, I installed it on the C drive
C:\ProgramData\MySQL\MySQL Server 5.6
There is a my.ini file inside, right-click and open it in Notepad mode.
2. Open my.ini with Notepad and find this sentence (there is a search shortcut in the editor) --------------default-character-set=utf8- -------------
Change utf8 to gb2312.
3. Restart MySQL and end
Change Chinese mode at one time
1. Open MySQL
2. Enter set character_set_database/connection/server/ client ='gb2312'
3, status view
The above is the detailed content of What should I do if mysql cannot display Chinese?. For more information, please follow other related articles on the PHP Chinese website!