MySQL version 5.7.2
Check the data and modify the character set utf8mb4
I simply think that modifying the character set of the field can be solved, and then continue to report errors
I’m really angry. I modified the character set of the real table, and then continue to report errors
No temper
Find a blog to continue authentication and find that they have to modify the MySQL configuration file
Then I modified the character set in my.ini file
default-character-set=utf8mb4 character-set-server=utf8mb4
Then restart mysql,
I tried it anxiously and found that it didn’t succeed,
A word is missing
SET NAMES utf8mb4
Then it succeeded.
Then I found that this statement was one-time. Awkward…
Honestly increase configuration
3. Modify the MySQL configuration file my.cnf (my.ini for Windows)
My.cnf is usually located in etc/MySQL/my.cnf. After finding it, please add the following contents in the following three parts:
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_ connect=’SET NAMES utf8mb4′
The cost of such modification is a little big. It’s too troublesome. Forget it. Although successful, it will not change.