时间:2021-07-01 10:21:17 帮助过:24人阅读
需要使用的语句
set character_set_client=gbk;
set character_set_connection=gbk;
set character_set_database=gbk;
set character_set_results=gbk;
set character_set_server=gbk;
mysql客户端显示中文的正常配置
mysql> show variables like ‘%character%‘;
+--------------------------+---------------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------------+
| character_set_client | gbk |
| character_set_connection | gbk |
| character_set_database | gbk |
| character_set_filesystem | binary |
| character_set_results | gbk |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\ |
+--------------------------+---------------------------------------------------------+
8 rows in set (0.00 sec)
测试是否可以输出中文
create table user(name varchar(11));
insert into user value ("aaa");
select * from user;
insert into user value("我我我");
show create table user \G;
下次更新···
mysql中文乱码问题
标签:bin varchar mys database 使用 mysql中文乱码 res select gbk