当前位置:Gxlcms > 数据库问题 > mysql utf8编码设置

mysql utf8编码设置

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

 修改数据库db_test编码的命令为:

alter database db_test character set utf8;

2.检查现在的数据库编码设置。

  show variables like ‘%character%’;

  show variables like’%collation%’;

默认一般是latin1。

3.修改mysql编码

  set names utf8;

相当于

SET character_set_client=‘utf8‘;

SET character_set_connection=‘utf8‘;

SET character_set_results=‘utf8‘;

按照这个过程就可以了。

 

mysql utf8编码设置

标签:

人气教程排行