mysql表注释乱码

问题

  • 执行语句: alter table TABLE_XXX comment ‘中文号’;
  • 结果: use information_schema;
    1. select * from TABLES where TABLE_SCHEMA=’mydb’ and TABLE_NAME=’TABLE_XXX’
    2. TABLE_XXX 的注释为乱码

检查系统

  • 用show variables like “%colla%”;show varables like “%char%”;这两条命令查看数据库与服务端的字符集设置

修改

  • set collation_server=utf8_general_ci;
  • set collation_connection=utf8_general_ci;

你可能感兴趣的:(mysql)