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

jQuery plugin to achieve carousel effect

A jQuery plugin every day - jQuery plugin to impl...

Detailed explanation of the execution process of JavaScript engine V8

Table of contents 1. V8 Source 2. V8 Service Targ...

Detailed explanation of Mysql logical architecture

1. Overall architecture diagram Compared to other...

Practical record of MySQL 5.6 master-slave error reporting

1. Problem symptoms Version: MySQL 5.6, using the...

HTML tag overflow processing application

Use CSS to modify scroll bars 1. Overflow setting...

How to prevent Vue from flashing in small projects

Summary HTML: element plus v-cloak CSS: [v-cloak]...

Distinguishing between Linux hard links and soft links

In Linux, there are two types of file connections...

How to set Nginx to forward the domain name to the specified port

Enter /usr/local/nginx/conf sudo cd /usr/local/ng...

SQL statements in Mysql do not use indexes

MySQL query not using index aggregation As we all...

Docker uses nextcloud to build a private Baidu cloud disk

Suddenly, I needed to build a private service for...

How to use Cron Jobs to execute PHP regularly under Cpanel

Open the cpanel management backend, under the &qu...

Solution to incomplete text display in el-tree

Table of contents Method 1: The simplest way to s...

Introduction to MySQL isolation level, lock and MVCC

This article aims to clarify the relationship bet...