时间:2021-07-01 10:21:17 帮助过:5人阅读
查看设置结果
更改my.cnf之前:
mysql> SHOW VARIABLES LIKE ‘%char%‘; +--------------------------+---------------------------------------------------------------+ | Variable_name | Value | +--------------------------+---------------------------------------------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/local/mysql-5.6.21-linux-glibc2.5-x86_64/share/charsets/ | +--------------------------+---------------------------------------------------------------+
设置之后,重启mysql服务($ sudo service mysql 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/local/mysql-5.6.21-linux-glibc2.5-x86_64/share/charsets/ | +--------------------------+---------------------------------------------------------------+
mysql设置字符集CHARACTER SET
标签:oca variable database server 编码 result tar etc rac