如何查看mysql的字符集

查看mysql的字符集:
mysql> show variables like 'character/_set/_%';
+--------------------------+--------+
| 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_set_system 总是utf-8

这5个最好总是保持一致,要不就和乱码玩爽吧:
character_set_client   
character_set_connection
character_set_database 
character_set_results  
character_set_server   

你可能感兴趣的:(如何查看mysql的字符集)