MySQL中“转储SQL文件”生成的文件中中文字符乱码,查看数据库属性如下图:
解决方案:
直接进入:C:\Program Files\MySQL\MySQL Server 5.1路径下,修改my.ini文件,如下:
... ... ... ...
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.1/"
#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.1/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=utf8
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB