您的位置:首页 > 数据库 > MySQL

MySQL字符集的问题

2017-08-30 11:51 281 查看
mysql客户端登陆后 \s显示如下,居然有两处字符集为latin,但是配置文件中字符集的设置已经检查过都为utf8



再次以如下命令进行连接

mysql -uroot --password='xxx' -S /data/mysql/mysql32306/mysql.sock --default-character-set='utf8'

报错信息如下:

mysql: Character set 'utf8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file

按照提示查看/usr/share/mysql/charsets/Index.xml这个中的内容,修改红色标注中的内容为utf8



再次进行连接 mysql -uroot --password='xxx' -S /data/mysql/mysql32306/mysql.sock --default-character-set='utf8'正常

再次去掉--default-character-set='utf8'次参数进行连接,显示正常

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: