1.拷贝my-large.cnf到/etc下
mv my-large.cnf /etc/my.cnf
2.vi打开etc/my.cnf,加入以下配置
3.重启mysql /etc/init.d/mysqld restart
本文介绍如何通过修改MySQL配置文件my.cnf来设置MySQL默认字符集为UTF8,并确保连接时使用该编码,包括拷贝配置文件、编辑配置项及重启服务等步骤。
1.拷贝my-large.cnf到/etc下
mv my-large.cnf /etc/my.cnf
2.vi打开etc/my.cnf,加入以下配置
3.重启mysql /etc/init.d/mysqld restart

被折叠的 条评论
为什么被折叠?