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