正处于魔改当中,恰巧发现了下面这篇文章,把前因后果都讲清楚了:
这篇文章中我主要讲一下使用Navicat更改的方法。
use typecho;
alter table typecho_comments convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_contents convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_fields convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_metas convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_options convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_relationships convert to character set utf8mb4 collate utf8mb4_unicode_ci;
alter table typecho_users convert to character set utf8mb4 collate utf8mb4_unicode_ci;
config.inc.php
中
$db->addServer(array (
'host' => localhost,
'user' => 'youruser',
'password' => 'yourpassword',
'charset' => 'utf8mb4', //修改这一行 utf8 -> utf8mb4
'port' => 3306,
'database' => 'yourdatabase'
), Typecho_Db::READ | Typecho_Db::WRITE);
本文作者:博主: gyrojeff 文章标题:让Typecho支持Emoji
本文地址:https://cloud.tencent.com/developer/article/1827259
版权说明:若无注明,本文皆为“gyro永不抽风!”原创,转载请保留文章出处。
许可协议:署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 转载请保留原文链接及作者!
我的博客即将同步至腾讯云+社区,邀请大家一同入驻