Ubuntu系统中修改MySQL编码

MySQL
主要配置文件位置:/etc/mysql/my.cnf.

数据库表文件夹:/var/lib/mysql/,相当于Windows下MySQL的date文件夹

登录MySQL,执行编码显示:

show variables like 'character%';
引用:
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+