MySQL字符编码相关

ALTER TABLE adinfo DEFAULT CHARACTER SET utf8;
alter table adinfo convert to character set utf8;

SHOW VARIABLES LIKE 'character_set_%';
SHOW VARIABLES LIKE 'collation_%';

set character_set_client =utf8;
set character_set_connection =utf8;
set character_set_database =utf8;
set character_set_results =utf8;
set character_set_server =utf8;
# set character_set_system =gb2312;

SET collation_server = utf8_general_ci;
SET collation_database = utf8_general_ci;
SET collation_connection =utf8_general_ci;

show CREATE table adinfo;
show variables like 'character_set_database';
alter database chuanqi character set gbk;

 

你可能感兴趣的:(MySQL配置相关)