目录

关于修改MySQL数据库字符集

目录

关于修改MySQL数据库字符集

  • 查看数据库建表语句查询到使用的字符集:
show create table table_name
  • 修改数据库字符集:
alter database database_name default character set utf8 COLLATE utf8_general_ci;
  • 修改数据库表字符集
alter table database_name default character set utf8 collate utf8_general_ci;
  • 修改字段字符集
alter table table_name change tid tid varchar(64) character set utf8 collate utf8_general_ci;