//查看类型
SHOW VARIABLES WHERE Variable_name LIKE ‘character_set_%‘ OR Variable_name LIKE ‘collation%‘;
//修改库类型
ALTER DATABASE 库名 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
//修改表类型
ALTER TABLE 表名 CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
//修改数据表某字段类型utf8改为 utf8mb4_unicode_ci ALTER TABLE 表名 MODIFY `字段` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;