Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of setting the client to gbk by mysql

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how mysql sets the client to gbk. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Mysql sets the client to gbk: first open the my.ini file; then change the encoding statement to "default-character-set=gbk"; finally, type "set names gbk;" in the MySQL command line.

Set the default encoding of mysql database to gbk to solve Chinese garbled

To solve the problem of Chinese garbled in Mysql, it is best to change the default code of the database. This is generally handled as follows:

In the my.ini file under the mysql installation directory:

Modify the following

Line 57 is changed to: default-character-set=gbk

Modify the following

Line 81 is changed to: default-character-set=gbk

On the MySQL command line, enter: set names gbk

Then in the MySQL command line input: status; command, if the following picture: Server Db Client Conn four are all GBK, then support Chinese no problem, I personally experiment, absolutely!

Thank you for reading! On the mysql set the client to gbk method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report