查看默认字符集
MariaDB [(none)]> show variables like 'character_set%';
与mysql不同, mairadb需要修改
/etc/my.conf.d/client.conf
[client]
default-character-set=utf8mb4
/*********************************/
/etc/my.conf.d/server.cnf
[mysqld]
init-connect='SET NAMES utf8mb4'
character-set-server=utf8mb4
网友评论