CentOS查看和修改MySQL字符集
时间:2021-07-01 10:21:17
帮助过:34人阅读
=
3306
socket=/var/lib/mysql/
mysql.sock
default-character-set=
utf8
[mysqld]
datadir=/var/lib/
mysql
socket=/var/lib/mysql/
mysql.sock
default-character-set=
utf8
user=
mysql
# Disabling symbolic-links
is recommended to prevent assorted security risks
symbolic-links=
0
[mysql]
no-auto-
rehash
default-character-set=
utf8
[mysqld_safe]
log-error=/var/log/
mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
3. 重启mysql服务:service mysqld restart
再次查看mysql编码,已经更新成如下信息
这样就行了,然后导入数据库就不会出现中文乱码了
mysql> source /var/www/html/charge.sql
完工
CentOS查看和修改MySQL字符集
标签:soc ash etc ble variables 中文乱码 编码 port logs