mysql5.7 specify the character set

In this configuration, the following can add the following line

[mysqld]

character_set_server=utf8

After the restart:

mysql> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

Guess you like

Origin www.cnblogs.com/zhouquan-1992-04-06/p/11440287.html