mysql中文乱码笔记

修改的文件是mysql目录下my.ini

这个是我修改后的解决了中文乱码

port=3306
[mysql]
default-character-set=gbk

# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306


#Path to installation directory. All paths are usually resolved relative to this.
basedir=D:/mysql/

#Path to the database root
datadir=D:/mysql/Data/

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=gbk

我只添加了以上代码中如下代码就解决了乱码

[mysql]
default-character-set=gbk

猜你喜欢

转载自zhouxuebao87.iteye.com/blog/1722473
今日推荐