修改某个表字段的字符集
ALTER TABLE apply_info MODIFY member_name varchar(128) CHARACTER SET utf8mb4;
查看某个库的字符集类型
use chat;
select @@character_set_database;
修改数据库的默认字符集
ALTER DATABASE chat
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_bin;
修改某个表字段的字符集
ALTER TABLE apply_info MODIFY member_name varchar(128) CHARACTER SET utf8mb4;
查看某个库的字符集类型
use chat;
select @@character_set_database;
修改数据库的默认字符集
ALTER DATABASE chat
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_bin;