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
Web Server 1. The web server turns off unnecessar...
What is Fuser Command? The fuser command is a ver...
Table of contents vue2.x vue3.x tiny-emitter plug...
Table of contents Product Requirements Ideas Prob...
Three ways to introduce CSS 1. Inline styles Adva...
It is common to view code effects in different br...
Preface: Today I want to remotely connect to MySQ...
Whenever I have any unclear questions, I come to ...
Table of contents 1. Technical Overview 2. Techni...
1. Problems encountered In the process of distrib...
Preface The gradient of the old version of the br...
This article example shares the specific code for...
Table of contents About Maxwell Configuration and...
Table of contents Nginx proxies two socket.io ser...
The four property values of position are: 1.rel...