荣耀之链论坛

?找回密码
?立即注册
搜索
查看: 1446|回复: 1
打印 上一主题 下一主题

mariadb设置字符集为utf8mb4

[复制链接]

550

主题

957

帖子

4414

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4414
跳转到指定楼层
楼主
发表于 2016-11-13 17:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
http://blog.csdn.net/aoerqileng/article/details/52709774

编辑server.cnf

[mariadb-10.0]
character-set-client-handshake = FALSE
character_set_server = utf8mb4
#character_set_results = utf8mb4
character_set_filesystem = utf8mb4
#character_set_database = utf8mb4
#character_set_connection = utf8mb4
character_set_client = utf8mb4
character-set-client-handshake = 0
collation_server = utf8mb4_unicode_ci

default-time-zone = '+8:00'

550

主题

957

帖子

4414

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4414
沙发
?楼主| 发表于 2016-11-15 10:59 | 只看该作者
编辑/etc/my.cnf

在mysqld里面增加
character-set-client-handshake = FALSE
character_set_server = utf8mb4
#character_set_results = utf8mb4
character_set_filesystem = utf8mb4
#character_set_database = utf8mb4
#character_set_connection = utf8mb4
character_set_client = utf8mb4
character-set-client-handshake = 0
collation_server = utf8mb4_unicode_ci

default-time-zone = '+8:00'

然后重启mariadb数据库
systemctl restart mariadb.service
就好了


我还设置了其他的
[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

荣耀之链 ( 鄂ICP备13014567号-2 )

GMT+8, 2019-10-15 14:10365体育让提款吗 , Processed in 0.014218 second(s), 20 queries .

Powered by Discuz! X3.4

? 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表