这几天写文章的时候,用到了Emoji表情
🤑🤓🤗🙄🙃🤐🤔🌝😳😊😘😂😭🙏🖖✌🙈👻💩🎀🍷💋👑🎃💯✨💫
发布文章的时候,报错“Database Query Error”

百度查了一下,发现数据库不支持Emoji表情,需要更改数据库'charset'

修改方法:

1、首先登录博客数据库,选择再用的数据库,点SQL执行以下命令:

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;

2、接着去博客根目录修改配置文件charset值
utf8改为utf8mb4

现在就可以发布Emoji表情了🎆

参考教程:秦枫鸢梦

Last modification:March 28th, 2021 at 11:35 am
If you think my article is useful to you, please feel free to appreciate