Open hrh47 opened 5 years ago
更改 /etc/mysql/my.cnf,增加這些設定:
[mysqld] character-set-server=utf8mb4 collation-server=utf8mb4_unicode_ci
[client] default-character-set=utf8mb4
[mysql] default-character-set=utf8mb4
MySQL 將預設資料庫編碼 latin1 改為 UTF8
再见乱码:5分钟读懂MySQL字符集设置
更改 /etc/mysql/my.cnf,增加這些設定:
[mysqld] character-set-server=utf8mb4 collation-server=utf8mb4_unicode_ci
[client] default-character-set=utf8mb4
[mysql] default-character-set=utf8mb4