How to solve the DOS window garbled problem in MySQL

How to solve the DOS window garbled problem in MySQL

The garbled code problem is as follows:

The reason for the problem is very simple. It is nothing more than a deviation between the encoding of the command line and the encoding set internally in MySQL. We right-click the properties to check the encoding of the following command line, which is GBK.

solve:

mysql> show variables like 'character%'; -- Fuzzy query global variables starting with character 

  • character_set_client: The character set of the client
  • character_set_connection: Character set for the connection
  • character_set_results: character set of query results

The above three can be set to GBK respectively: set xxx = gbk ;

This can be done simply by: set names gbk ;

Of course, the above two steps are temporary and will still be the same next time you turn it on, so the graphical interface is really great.

So far, it's over:

Author: Tianqiao Baxia Source: https://www.cnblogs.com/summerday152/
This article has been included in Gitee: https://gitee.com/tqbx/JavaBlog
If you are interested, you can visit my personal website: https://www.hyhwky.com

The above is the details of how MySQL solves the DOS window garbled problem. For more information about MySQL DOS window garbled characters, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Solution to the garbled code problem in MySQL 5.x
  • Solution to the Chinese garbled code problem in the decompressed version of MYSQL
  • How to solve the problem of Chinese garbled characters when using MySQL to obtain database data
  • Example solution for writing garbled Chinese characters into MySQL in PHP
  • MySQL character set garbled characters and solutions
  • Solution to MySQL garbled code problem under Linux
  • How to deal with garbled characters in Mysql database
  • How to solve the problem of Chinese garbled characters when inserting table data into MySQL
  • Solve the problem of Chinese garbled characters when inserting data into MySQL by Tomcat under Linux
  • Summary of handling JDBC connection mysql garbled code exception problem

<<:  Analysis of the configuration process of installing mariadb based on docker

>>:  Detailed explanation of Javascript string methods

Recommend

Detailed explanation of setting resource cache in nginx

I have always wanted to learn about caching. Afte...

How to use Docker plugin to remotely deploy projects to cloud servers in IDEA

1. Open port 2375 Edit docker.service vim /lib/sy...

HTML form submission method case study

To summarize the form submission method: 1. Use t...

JavaScript ECharts Usage Explanation

I used ECharts when doing a project before. Today...

Example of implementing grouping and deduplication in MySQL table join query

Table of contents Business Logic Data table struc...

Write a mysql data backup script using shell

Ideas It's actually very simple Write a shell...

Vue sample code for implementing two-column horizontal timeline

Table of contents 1. Implement the component time...

About Zabbix custom monitoring items and triggers

Table of contents 1. Monitoring port Relationship...

Summary of new usage examples of computed in Vue3

The use of computed in vue3. Since vue3 is compat...

Vue conditional rendering v-if and v-show

Table of contents 1. v-if 2. Use v-if on <temp...

How to solve nginx 503 Service Temporarily Unavailable

Recently, after refreshing the website, 503 Servi...