Home  >  Article  >  Database  >  How to solve mysql garbled code using cmd

How to solve mysql garbled code using cmd

coldplay.xixi
coldplay.xixiOriginal
2020-09-30 14:08:472568browse

cmd method to solve mysql garbled characters: 1. Modify cmd character set method, the code is [rem switch to UTF-8]; 2. Set cmd to display MySQL character set method, the code is [set names utf8 rem setting into GBK].

How to solve mysql garbled code using cmd

cmd method to solve mysql garbled code:

1. Modify cmd character set method

rem 切换到UTF-8
chcp 65001
rem 切换到默认的GBK
chcp 936
rem 美国英语
chcp 437

2. Method of setting cmd to display MySQL character set

rem 设置成utf8
set names utf8
rem 设置成GBK
set names gbk

3. Solution

cmd character set is the default gbk. In the MySQL login state, set the cmd character set of MySQL to gbk. MySQL Chinese is normal. Show

More related free learning recommendations: mysql tutorial(Video)

The above is the detailed content of How to solve mysql garbled code using cmd. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn