Mysql中文乱码

一、Mysql乱码解决办法

(1)修改 my.ini(MySQLServer Instance Configuration文件)为gbk

[client] port=3306 [mysql] default-character-set=gbk 1. SERVER SECTION 1. ---------------------------------------------------------------------- 1. 1. The following options will be read by the MySQL Server. Make sure that 1. you have installed the server correctly (see above) so it reads this 1. file. 1. [mysqld] 1. 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="C:/Program Files/MySQL/MySQL Server 5.1/" #Path to the database root datadir="C:/ProgramData/MySQL/MySQL Server 5.1/Data/" 1. The default character set that will be used when a new schema or table is 1. created and no character set is defined default-character-set=gbk