Home > database >  MySQL Chinese garbled
MySQL Chinese garbled

Time:10-29

I according to the online tutorial on the command line encoding to utf-8, why use Chinese or the code in the database? Built directly with Navicat table can type in Chinese, but in doing registration page when you type in Chinese when your account was registered in database, it becomes gibberish,

CodePudding user response:

Directly built table can type in Chinese, the database no problem
Problems should be out in your code, such as your page code, backstage after receiving the encoding of the string, etc

CodePudding user response:

General mysql in the installation directory C: \ ProgramData \ mysql \ mysql Server 5.7 find my ini file open
Uncomment
[mysql]
Default - character - set=utf8
Character - set - server=utf8

Run the CMD to restart the mysql service
Net stop MySql57 stop service
Net start MySql57 startup services

CodePudding user response:

From the MySQL configuration file directly modify MySQL server and client characters, if change the existing data table data set, need to lead the table structure,

CodePudding user response:

You big probability is not reason, the database is spread to the background data is garbled, check the web. The XML coding filter configuration, before I had a wrong, change the url/into/*
  • Related