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
Mysql is a mainstream open source relational data...
In web development, you often encounter characters...
Preface Most people will probably perform this op...
1. Command Introduction The usermod (user modify)...
Web page WB.ExecWB control printing method Copy c...
Use HTML color blocks to dynamically display data...
Table of contents Preface concept Stabilization d...
What is MIME TYPE? 1. First, we need to understand...
This is my first blog. It’s about when I started ...
This article shares the MySQL Workbench installat...
Table of contents Implementation ideas There are ...
When I turned on my MAC at night, I found that th...
The previous article introduced how to achieve a ...
Carousel The main idea is: In the large container...
Table of contents 1. What is an index signature? ...