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

How to change the coded character set of mysql database

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

Share

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

This article mainly introduces how to change the coded character set of mysql database, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

The method of changing the coded character set of the mysql database: 1, open the my.ini configuration file; 2, find the mysqld tag and add the configuration [character-set-server=utf8] under the tag; 3, restart the mysql service.

Specific methods:

1. Go to the installation directory of mysql and find the my-default.ini or my.ini configuration file. You can change my-default.ini to my.ini.

2. My my.ini has only one [mysqld] tag, and everything else is in the comment state. We do two things in my.ini.

(1) add: character-set-server=utf8 under the [mysqld] tag

(2) add a [client] tag and add: default-character-set=utf8 under the [client] tag

3. Restart the mysql service

4. Enter the dos interface, log in to the database, and enter the command: show variables like "% char%". If the result shown in the following figure appears on the dos interface, it shows that you have modified the mysql code successfully.

Thank you for reading this article carefully. I hope it will be helpful for everyone to share how to change the coded character set of the mysql database. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

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

Database

Wechat

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

12
Report