Home > Database > Mysql Tutorial > body text

What should I do if mysql cannot display Chinese?

little bottle
Release: 2020-09-15 15:37:30
Original
9401 people have browsed it

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?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template