Find the problemRecently, when I connected to the MySQL server through the MySQL command, I was unable to input Chinese characters, as shown below: mysql> SELECT 'Chinese characters <> are stripped'; +------------------------------------+ | Chinese characters <> are stripped | +------------------------------------+ | Chinese characters <> are stripped | +------------------------------------+ 1 row in set (0.00 sec) All Chinese characters entered will be replaced with blanks. The above test is for the official mysql-5.7.32 version. After going through the official mysql changelog-5.7.34, I found that Oracle's official mysql-5.7.34 and mysql-8.0.24 fixed the following bugs respectively.
Refer to bug-102806, which shows a similar problem as described above. The interactive mode of the mysql command line does not support input of all wide characters. What will happen if I cannot input Chinese?From the test, this bug only affects the session operation of connecting to MySQL server in interactive mode through mysql command. If there is a version online using this bug, the problem of losing Chinese characters may occur when operating the table. The following methods are not affected:
Which versions are affected?This bug was fixed in 5.7.34 and 8.0.24, see github-mysql-patch-117fb2. From the patch, the bug has nothing to do with the libedit version, whether it is rpm, deb or official build version. From our testing, the following versions are affected:
Note: Other releases are not clear yet, and there is a high probability that the same problem will occur. However, releases are usually a step behind the official ones, and their lower versions may fix the problem in advance. How to deal with itThe selection of online versions can focus on some versions that have been used, such as the ones I often use: - percona branch percona-5.6.45 percona-5.7.28 percona-8.0.22 - Official version mysql-5.6.29 mysql-5.7.28 mysql-8.0.19 If the affected versions are already in use online, you can use the following methods to handle it: Temporary treatmentIf it is not convenient to upgrade, you can first use the mysql client command below 5.7.30 or 5.7.34 and above; Minor version upgradeIf it is convenient to upgrade a minor version, it is recommended to upgrade to the following version:
SummarizeThis is the end of this article about the problem that MySQL commands cannot be input into Chinese. For more related content about MySQL commands cannot be input into Chinese, 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:
|
<<: 6 Ways to Elegantly Handle Objects in JavaScript
>>: Detailed explanation of Docker working mode and principle
Table of contents What to do when registering an ...
There are 4 commonly used methods, as follows: 1....
Development Pain Points During the development pr...
1. Docker installation and settings #Install Cent...
This article shares the installation and configur...
Preface When the system space usage is too large ...
1. Construction components 1. A form must contain...
<br />Related articles: Web skills: Multiple...
Table of contents 1. What is 2. Use Numeric Enume...
Table of contents Before transformation: After tr...
Use js to control the light switch for your refer...
Preface Recently I started using robot framework ...
1. Why does nginx use gzip? 1. The role of compre...
I'm currently working on my own small program...
This article uses jQuery to implement the sliding...