MYSQL solves the problem of inserting Chinese garbled characters

Today I found that when inserting Chinese into mysql, a lot of them appeared? ? ? ? ? ####Garbled characters.

Solution (straightforward)

Find the my.ini file, usually in the path of
Insert image description here
, you can also use Everthing, this tool is simple and crude to find! Insert image description here
After opening this file, find [client] [mysql] [mysqld]

[client] Add default-character-set=utf8 under [mysql] respectively
Add character-set-server=utf8 under [mysqld]

Save and close the file.
Then restart the mysql service.
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Done!

Guess you like

Origin blog.csdn.net/weixin_43298513/article/details/132712790