Mysql> show variables like 'Char % ';
You can view the encoding format of MySQL:
| Variable_name | value |
+ -------------------------- + --------------------------------------------------------- +
| 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 | c: \ Program Files \ mysql \ MySQL Server 5.0 \ share \ charsets \ |
This completes viewing the encoding format in your MySQL. If you want to modify the encoding format, continue with the following steps:
Open the MySQL installation directory, which contains a my. ini file. Open this file, which contains two character set settings. The default setting is Latin. We recommend that you change it, such as utf8 or GBK.
Then start the MySQL service. The default Character Set of the database created later is OK.
Reprinted from: http://hybxiaodao.iteye.com/blog/939350