当前位置:Gxlcms > 数据库问题 > linux下mysql中文显示乱码,读取又正常

linux下mysql中文显示乱码,读取又正常

时间:2021-07-01 10:21:17 帮助过:2人阅读

        在第一次进入mysql时,加一句

     set names utf8  //设置编码

      解决方法2:

           修改/etc/my.cnf文件;

    在[client]下添加
    default-character-set=utf8
    在[mysqld]下添加
    default-character-set=utf8

           最后

          /etc/init.d/mysql restart   重启即可

 

        

linux下mysql中文显示乱码,读取又正常

标签:

人气教程排行