mysql字符集
运行命令:SHOW VARIABLES LIKE ‘character_set_%’; 或者
show variables like ‘char%’;
结果
'character_set_client', 'utf8'
'character_set_connection', 'utf8'
'character_set_database', 'latin1'
'character_set_filesystem', 'binary'
'character_set_results', 'utf8'
'character_set_server', 'latin1'
'character_set_system', 'utf8'
会导致中文乱码:做以下修改:
set character_set_client =utf8;
set character_set_connection =utf8;
set character_set_results =utf8;
set character_set_server =utf8;
set character_set_system =utf8;