mysql数据库设置编码utf8
我下载的是安装包mysql-installer-community-5.7.25.0.msi,只安装了MySQLserver
更改安装根目录下my.ini
在下面更改或添加如下
[client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] character_set_server = utf8
更改完成重启mysql
查看编码
mysql>showvariableslike"%character%";
+--------------------------+-------------------------------------------------------------+ | Variable_name | Value | +--------------------------+-------------------------------------------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | E:\tools\developTool\MySQL\MySQL Server 5.7\share\charsets\ | +--------------------------+-------------------------------------------------------------+
不知道是什么刚改完重启后
character_set_database项与character_set_server项的编码一直是latin1,后来
在[mysqld]项下default-character-set=utf8结果mysql服务不能启动了,后来又把此项删去了,再次启动就都变成utf8了
相关推荐
wwwsurfphpseocom 2020-10-28
learningever 2020-09-19
周游列国之仕子 2020-09-21
voiletbin 2020-07-26
ldcwang 2020-07-26
mjshldcsd 2020-06-14
88236637 2020-06-03
81214051 2020-06-01
阳历六月 2020-05-14
bluet00 2020-05-12
wintershii 2020-04-21
luckyxl0 2020-04-19
MissFuTT 2020-04-15
88384957 2020-03-27
airfling 2020-02-22