MySQL will appear in Chinese garbled because
1.server itself set the problem, generally is latin1
2. No coding format was developed for the construction of the database.
MySQL in the form of input data appear in Chinese garbled solution:
1. When building a library
CREATE DATABASE test
CHARACTER SET ' UTF8 '
2. When building a table
CREATE TABLE content (
text VARCHAR (100)
Basically there will be no problem, that is, the same encoding format is used to build the library and build the table.
1. View the default encoding format:
The following is a modified
Mysql> Show variables like "%char%";
+--------------------------+---------------------------------------------------------+
| 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 | /usr/local/mysql-5.7.13-osx10.11-x86_64/share/charsets/|
+--------------------------+---------------------------------------------------------+
2. View the encoding format of the test database:
The above is a small set to introduce the MySQL in the form of data entry in the table of Chinese garbled solution, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!