For MySQL Chinese processing, it is best to adopt international standard UTF-8 character set. If garbled characters appear in the data table when saving Chinese characters, perform the following operations :【 Database EndSet and Development endSettings]
1. Development end:
Add utf8 to the connected URL:
JDBC: mysql: // localhost: 3306/[database name ]? Useunicode = true & amp; characterencoding = UTF-8
2, database: If you want the newly installed MySQL to support the UTF-8 character set by default, perform the following steps:
- After installing MySQL, find the my. ini file and change all the relevant areas in the file to: default-character-set = utf8
- Run the show variables like 'character _ SET _ % 'command in the MySQL Command window. The UTF-8-related content is as follows:
-
- Run show variables like 'collation _ % '; you can also see the UTF-8-related content, as shown below:
- Re-create database and table: Create Database [database name] Character Set utf8;