Solution becomes a question mark when writing Chinese mysql

The first:

When built table plus charset utf8mb4: create database ya charset utf8mb4

 

The second:

把编码改为可识别中文:
mysql> show variables like '%character%';
+--------------------------+----------------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------------+
| character_set_client | gbk |
| character_set_connection | gbk |
| character_set_database | utf8 |
| character_set_filesystem | utf8 |
| character_set_results | gbk |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\mysql-5.6.45-winx64\share\charsets\ |
+--------------------------+----------------------------------------+

Format set character_set_database = utf8;

 

Third: Change profile my.in

 

= NO_ENGINE_SUBSTITUTION the sql_mode, the STRICT_TRANS_TABLES 
[mysqld]
# mysql installation directory path disposed behind ** sql directory must be installed (own computer) **
the basedir = C: \ mysql-5.6.45-Winx64
# setting data mysql database storage directory must be Data
DATADIR = C: \ MySQL-5.6.45-Winx64 \ Data
the sql_mode = NO_ENGINE_SUBSTITUTION, the STRICT_TRANS_TABLES
# MySQL port
port = 3306
# character set
[mysqld]
character-Server-sET = UTF8
collation = utf8_general_ci-Server
[Client]
default = UTF8-Character-SET
[MySQL]
default = UTF8-Character-SET

Guess you like

Origin www.cnblogs.com/yangzhixue/p/11449525.html