1.修改 /etc/my.cnf [client] default-character-set=utf8 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 default-character-set=utf8 skip-name-resolve [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid default-character-set=utf8 2.重启mysql service mysqld restart 3.修改数据库的默认编码 ALTER DATABASE DBNAME CHARACTER SET UTF8
解决fedora 14 mysql 中文乱码问题
最新推荐文章于 2024-11-08 22:59:30 发布