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

Simple steps to encapsulate components in Vue projects

Table of contents Preface How to encapsulate a To...

MySQL 8.0.23 installation and configuration method graphic tutorial under win10

This article shares the installation and configur...

Solution to Linux not supporting all commands

What should I do if Linux does not support all co...

CSS+HTML to realize the top navigation bar function

Implementation of navigation bar, fixed top navig...

Detailed steps for porting busybox to build a minimal root file system

Busybox: A Swiss Army knife filled with small com...

Why MySQL can ignore time zone issues when using timestamp?

I have always wondered why the MySQL database tim...

CSS code for arranging photos in Moments

First, you can open Moments and observe several l...

Linux common text processing commands and vim text editor

Today, let's introduce several common text pr...

The difference between VOLUME and docker -v in Dockerfile

There are obvious differences between volume moun...

Native js implements shopping cart logic and functions

This article example shares the specific code of ...

MySQL partitions existing tables in the data table

Table of contents How to operate Operation proces...