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
1. MYSQL installation directory Copy the code as ...
Integrity constraints Integrity constraints are f...
In the previous blog, Xiao Xiong updated the meth...
This article shares the specific code of js to im...
The HTTP status code is a 3-digit code used to in...
Table of contents 1. Implement the component time...
Win10 system locally installed MySQL8.0.20, perso...
Windows Server 2012 and Windows Server 2008 diffe...
This article takes Centos7.6 system and Oracle11g...
Table of contents think 1. Greedy Snake Effect Pi...
Preface If you frequently access many different r...
Table of contents Preface JavaScript find() Metho...
Preface HTTP and HTTPS In our daily life, common ...
Grid is a two-dimensional grid layout system. Wit...
Preface When operating and managing Linux servers...