查看数据库字符集和排序规则
SHOW VARIABLES LIKE 'character%';
SHOW VARIABLES LIKE 'collation%';
修改table_name表的字符集和排序规则
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
查看数据库字符集和排序规则
SHOW VARIABLES LIKE 'character%';
SHOW VARIABLES LIKE 'collation%';
修改table_name表的字符集和排序规则
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;