PrefaceProblem description:
This article uses the modification of configuration files, which can be done in a few minutes. Please back up before modification~~ Some friends will get an error when inserting Chinese into MySQL, so we need to specify the character set. Use a command to view the character set of the current data~ (Latin when not modified)
We can have temporary solutions and permanent solutions. Here we only talk about permanent solutions: To support Chinese, change to utf-8 1. First find the mysql configuration file my.ini This file contains many mysql configurations, both client and server. first step:In this directory: Right click properties: Copy the target content to Notepad: “C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe” “–defaults-file=C:\Program Files\MySQL\MySQL Server 5.7\my.ini” “-uroot” “-p” “–default-character-set=utf8” This section looks for the target file: C:\Program Files\MySQL\MySQL Server 5.7\my.ini If this file does not exist, you can check whether it is hidden: Then find this file Step 2: Modify this my.iniNote that when modifying my.ini, you must back up and copy and paste it (this is a good working habit) Find this location: Change to utf8 (not utf-8) Change 2: In mysqld here Remove the comment and the value will become utf8. After the modification is completed, save and close it! Finally, you can use the first command to view the same as above picture~~ SummarizeThis is the end of this article about permanently solving the problem of Chinese text insertion failure in MySQL. For more relevant content on solving the problem of Chinese text insertion failure in MySQL, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: CSS achieves the effect of aligning multiple elements at both ends in a box
This article shares the installation and configur...
YSlow is a page scoring plug-in developed by Yaho...
Recently, I have been working on several virtual ...
Click here to return to the 123WORDPRESS.COM HTML ...
Copy code The code is as follows: <HTML> &l...
need: The backend returns an array object, which ...
Recently, I found a fun hover animation from the ...
MySQL deployment Currently, the company deploys M...
0. Why do we need remote development? When develo...
About derived tables When the main query contains...
Open Source Database Architecture Design Principl...
Generally, after there is a menu on the left, the...
Preface For a long time, the application and lear...
Mixins provide a very flexible way to distribute ...
Table of contents 1. Prototype 2. Prototype chain...