正常情况下数据库不兼容 emoji,所以为了实现 typecho 可以调用 emoji,所以要对数据库进行一点小修改。
修改配置文件
修改服务器根目录中的config.inc.php
文件
将原本的uft8改为uft8mb4
配置数据库
进入数据库执行以下语句(其中语句最好要与数据库内容相对应)
alter table typecho_comments convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_contents convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_fields convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_metas convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_options convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_relationships convert to character set utf8mb4 collate utf8mb4_general_ci;
alter table typecho_users convert to character set utf8mb4 collate utf8mb4_general_ci;