mysql5.6.34在默认配置文件修改字符集为utf8后重启mysql服务没效果

[client]    
default-character-set=utf8  
  
[mysql]    
default-character-set=utf8  
  
  
[mysqld]  

# Remove leading # and set to the amount of RAM for the most important data  
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.  
# innodb_buffer_pool_size = 128M  
  
# Remove leading # to turn on a very important data integrity option: logging  
# changes to the binary log between backups.  
# log_bin  
  
# These are commonly set, remove the # and set as required.  
  
basedir = D:\mysql-5.6.34-winx64  
datadir = D:\mysql-5.6.34-winx64\data  
port = 3306  
character-set-server=utf8  
# server_id = .....  

4:我重启我的mysql服务,命令是net stop mysql,然后net start mysql
5:然而没有任何效果,我用root用户进入mysql,执行命令show variables like '%character%';
6:结果如下:(还是latin字符集)


mysql5.6.34在默认配置文件修改字符集为utf8后重启mysql服务没效果_第1张图片

9:我想了一下,网上很多人修改配置文件都成功了,为什么我没成功,我和他们环境的唯一区别就是,我用的的事my-default.ini,而他们用的是my.ini
10:于是我复制了一份my-default.ini将其改名成my.ini
11:安装上面的步骤,重复一次,搞定。就是这个问题
12:截图如下:


mysql5.6.34在默认配置文件修改字符集为utf8后重启mysql服务没效果_第2张图片

你可能感兴趣的:(mysql5.6.34在默认配置文件修改字符集为utf8后重启mysql服务没效果)