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
question After Nginx reverse proxy, the Tomcat ap...
Programs in Docker containers often need to acces...
Table of contents 1. Relationship between parent ...
The previous article was a simple review of the B...
There are many commands used in the system, so ho...
The mysql connection must first be initialized th...
Table of contents Preface 1. Routing lazy loading...
Table of contents 1. Effect 2. Main code 1. Effec...
Table of contents 1. The original array will be m...
<br />Yesterday I saw at W3C that the new HT...
The road ahead is long and arduous, but I will co...
byzhangxinxu from https://www.zhangxinxu.com/word...
Table of contents Install Tomcat Download Tomcat ...
Today, when testing the null value, I found a sma...
MySQL has non-standard data types such as float a...