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 modify the character set by mysql5.6

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this article Xiaobian for you to introduce in detail "mysql5.6 how to modify the character set", the content is detailed, the steps are clear, the details are handled properly, I hope this "mysql5.6 how to modify the character set" article can help you solve your doubts, following the editor's ideas slowly in-depth, let's learn new knowledge.

Methods: 1. Add "character_set_server=utf8" under the mysqld of "my.cnf" and "default-character-set=utf8" under the client; 2. Restart with "service mysql restart".

The operating environment of this tutorial: windows10 system, mysql5.6 version, Dell G3 computer.

How to modify the character set by mysql5.6

Mysql 5.6 modifies the character set

View the character set:

Show variables like 'character%';show variables like'% char%'

The default is that both the client and server use latin1, so Chinese will be garbled.

1. Modify the character set

Modify / etc/my.cnf configuration file

[mysqld] character_set_server=utf8collation-server=utf8_general_ ci. [client] # set client character set default-character-set=utf8

2. Restart mysql

Service mysql restart

Command settings, use effective

Create database aa default-character-set=utf8;-- only this database is utf-8 read here, this "mysql5.6 how to modify the character set" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more related articles, welcome to follow the industry information channel.

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