

免费资源网 – https://freexyz.cn/
如何解决centos mariadb 乱码问题?
CentOS 7 配置MariaDB(MySQL)字符编码,防止中文乱码
[root@localhost~]# vi /etc/my.cnf (如果不行则sudo vi /etc/my.cnf) #在[mysqld]标签下添加 character-set-server=utf8 [root@localhost~]# vi /etc/my.cnf.d/client.cnf #在[client]标签下添加 default-character-set=utf8重启
[root@localhost~]# systemctl restart mariadb mysql -u root -p 后查看现在的字符编码 show variables like %character%;
免费资源网 – https://freexyz.cn/
© 版权声明
THE END
暂无评论内容