mySql编码改成utf-8

MySQL初始化
字符集: 默认的字符集为拉丁英文Latin1 (Iso-8859-1 英文字符
我们要改成utf8 [Unicode]
或GBK,GB2312
找到MySQL安装的文件夹,找到my.ini配置文件,例如:
D:\Program Files\MySQL\MySQL Server 5.5\ my.ini配置文件

port=3306 (<–端口要是3306)

[mysql]
将my.ini里面改下面两个地方:
default-character-set= utf8 (<–把latin1改成utf8 )

#The default character set that will be used when a new schema or table is
#created and no character set is defined
character-set-server=utf8 (<–把这里改成utf8)

发布了34 篇原创文章 · 获赞 7 · 访问量 2190

猜你喜欢

转载自blog.csdn.net/qq_37717494/article/details/104565433