1. Check the MySQL database encodingmysql -u username -p password show variables like 'char%'; 2. Coding explanation
3. Console garbled characters3.1 Garbled characters appear when inserting or modifying Reason: The cmd command line uses gbk encoding by default, but character_set_client is utf8. solve: set character_set_client = gbk; 3.2 The queried data is garbled Reason: The cmd command line uses gbk encoding by default, but set character_set_results is utf8. solve: set character_set_results = gbk; 4. Specify the default encodingThe above solution is only valid for the current connection. When you exit the window, you need to set the variable again when you log in to MySQL again. Therefore, in order to solve the problem once and for all, we can set it in my.ini under the MySQL installation directory : Just change it to gbk: See the effect: At this point, our MySQL encoding problem in command line operations has been successfully solved~! SummarizeThis is the end of this article about the detailed explanation of encoding issues during MySQL command line operations. For more relevant MySQL command line operation encoding content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Design theory: people-oriented green design
>>: An example of the calculation function calc in CSS in website layout
Linux installation MySQL notes 1. Before installi...
Table of contents 1. Use slots to make components...
Solve the problem that the responseText returned ...
Table of contents 1. Common mistakes made by begi...
Let's take a look at the problem of VScode re...
This article uses examples to explain the princip...
Mainly used knowledge points: •css3 3d transforma...
Local Windows remote desktop connects to Alibaba ...
Often you will encounter a style of <a> tag ...
Table of contents 1. Server 2. Client 3. Testing ...
wedge Because the MySQL version installed on the ...
Table of contents 1.MySQL adds or subtracts a tim...
Recently, I made a function similar to shake, usi...
Things to note 1. First, you need to create a my....
Let me first explain why the text is not vertical...