>show variables like 'character%'
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
从以上信息可知数据库的编码为latin1,需要修改为gbk或者是utf8;
一、查看MySQL数据库服务器和数据库MySQL字符集。show variables like '%char%'二、查看MySQL数据表(table)的MySQL字符集。
show table status from sqlstudy_db like '%countries%'三、查看MySQL数据列(column)的MySQL字符集。
show full columns from countries我们有学习小组也 希望一起学习进步 Oracle-Linux交流 103 382 476
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)