MYSQL64位windows中文乱码

1、查看编码
show variables like 'character%'
2、修改编码
set @@character_set_server='utf8';
3、重启mysql服务


创建数据库
GBK: create database test2 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci; 
 
UTF8: CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; 

你可能感兴趣的:(windows)