sudo vim /etc/mysql/my.cnf
在[mysqld]中加上此行
=============================
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
=============================
重啟mariadb
service mysql restart
最後確認是否使用utf8mb4
SHOW VARIABLES LIKE "char%";
+--------------------------+-----------------------------------------------+
| Variable_name | Value |
+--------------------------+-----------------------------------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8mb4 |
或是mysql>status;
【變更TABLE支援UTF8】
先查詢TABLE欄位的語系
SHOW FULL COLUMNS FROM [TABLE_NAME];
變更成UTF8
ALTER TABLE 【TABLE_NAME】 CONVERT TO CHARACTER SET utf8mb4;
再查詢一次
【變更DATABASE支援UTF8】
ALTER DATABASE 【databasename】 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
character-set-server=utf8mb4
回覆刪除collation-server=utf8mb4_general_ci
Playland Casinos & Resorts in Las Vegas - MapYRO
回覆刪除Playland Casinos & Resorts · Las Vegas Casino and Resort. 익산 출장안마 · The 양주 출장샵 Venetian Hotel and Casino 성남 출장샵 · 제천 출장마사지 Wynn Las หารายได้เสริม Vegas and Encore. · The Mirage Hotel & Casino.