当前位置: > 数据库 > MySQL >

MySQL乱码

时间:2019-08-23 16:57来源:linux.it.net.cn 作者:IT
MySQL乱码:

  用语句 show variables like 'character%'; 来查看当前数据库的相关编码集。

修改My.cnf文件增加

[mysqld]
character-set-server=utf8
重启Mysql:


+--------------------------+----------------------------------+
| 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/share/charsets/ |
+--------------------------+----------------------------------+




(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容