Home > Database > Mysql Tutorial > Solve the problem of Chinese garbled characters written to mysql

Solve the problem of Chinese garbled characters written to mysql

王林
Release: 2020-01-27 21:11:09
forward
2881 people have browsed it

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

Solve the problem of Chinese garbled characters written to mysql

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

Solve the problem of Chinese garbled characters written to mysql

Then restart the mysql service, check the server parameter configuration again, and rewrite Chinese to normal.

Solve the problem of Chinese garbled characters written to mysql

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!

source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template