经过各种改配置文件之后,
>show variables like ‘%character%‘;
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
>show variables like ‘collation_%‘;
collation_connection utf8_general_ci
collation_database utf8_general_ci
collation_server utf8_general_ci
注意:
1、要在命令行下查看中文,执行:
>set character_set_results=gbk;
2、要在命令行下执行insert、update,执行:
>set character_set_client=gbk;
这两个命令退出数据库登陆之后,就失效了,返回原来的设置。
时间: 2024-10-29 19:09:42