MySQL command line interface Encoding

Source: Internet
Author: User

When executing commands on the MySQL command line interface, remember to set the encoding. Another unpleasant thing is that the last setting on the command line does not exist when you go in next time and you have to set it every time.

 

Set encoding:

# Log on to MySQL

Mysql-hxxx. XXX-Utest-P

 

-- Enter the password

 

Mysql>/s

Generally, the following information is displayed:

 

We can see two of the four types of encoding are utf8 and Latin1. In this case, if you operate Chinese, it will be as garbled as you think!

In order not to disturb the garbled characters, you can change the encoding:

 

 

 

This is why we can see that all codes are unified. Of course, there will be no problems in subsequent operations.

For example, source> XXX. SQL operations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.