在xampp安装目录下mysql\bin\my.cnf 在 # The MySQL server[mysqld]。。。。 下面代码中加入default-character-set=gbk 删除原来的数据库 新建就好了