问题
- 执行语句: alter table TABLE_XXX comment ‘中文号’;
- 结果: use information_schema;
- select * from TABLES where TABLE_SCHEMA=’mydb’ and TABLE_NAME=’TABLE_XXX’
- TABLE_XXX 的注释为乱码
检查系统
- 用
- show variables like "%colla%";
- show variables like "%char%";
- 这两条命令查看数据库与服务端的字符集设置
修改
- set collation_server=utf8_general_ci;
- set collation_connection=utf8_general_ci;