I. encoding configuration setting Mysql
1. Select the Default Character Set the Selected Manual / Collation
2. The Character Set is set to utf8
II. Mysql modify the configuration file my.ini coding (generally not required)
1. Locate the installation path Mysql
2. Open the my.ini
3.mysql client program is a command line
provided encoding: Character-SET-default = UTF8
4.mysqld server program is
provided encoding: character-set-server = utf8
Three .Mysql graphical interface coding Heidisql
Database coding 1.Heidisql
1. Right-click the database
2. Edit
3. character set: utf8 general ci
Coding 2.Heidisql table
1. Left-click at the table
2. Select option
3. Set Default collation: utf8_bin
IV. When using Java database connection
1. jdbc connection settings, increasing versatility
2. Get connected jdbc, additionally disposed behind the character encoding url
String url="jdbc:mysql://localhost:3306/mybase1?useUnicose=true&characterEncoding=utf-8";