Home >Database >Mysql Tutorial >Solve the problem of Chinese garbled characters written to mysql
The question leads to:
When writing data to the mysql database from another system, I found that the Chinese text changed to ?????.
The solution is as follows:
First check the database settings. The corresponding character set of the server is latinl
Recommended related learning video tutorials:mysql video tutorial
Adjust mysql parameter configuration, configuration file directory /etc/mysql/mysql.conf.d/
Add a line: character-set-server = utf8
Then restart the mysql service, check the server parameter configuration again, and rewrite Chinese to normal.
Recommended related articles and tutorials: mysql tutorial
The above is the detailed content of Solve the problem of Chinese garbled characters written to mysql. For more information, please follow other related articles on the PHP Chinese website!