Home > Database > Mysql Tutorial > MySQL5.6免安装版(绿色版or解压版)修改编码_MySQL

MySQL5.6免安装版(绿色版or解压版)修改编码_MySQL

WBOY
Release: 2016-06-01 13:00:10
Original
1188 people have browsed it

花了半个多小时,试了网上的各种办法,估计都是正常安装的,修改my.ini,但是在自己MySQL文件夹下找不到my.ini,找到了my-default.ini,以为相当于修改这个,看来不是。。。

方法:
(1)复制my-default.ini,并重命名为my.ini
(2)修改两处
(a)[mysqld]下加上
character_set_server = utf8
(b)sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
后面加上:
port=3306
default-character-set=utf8

重启MySQL,使用命令 SHOW VARIABLES LIKE ‘character%’;
然后可以看到
这里写图片描述

现在就OK啦~~

PS:讨厌开发以及现在的搜索引擎的一个原因是,对于新手,需要花很多时间尝试各个博客的方法,可能还是解决不了问题,看编码这么容易就能改的,我试了多少博客提出的办法啊…….浪费了太多时间

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template