Troubleshooting of MySQL Chinese data garbled in cmd

Source: Internet
Author: User

My MySQL uses the default utf8 encoding, and the database is also configured with utf8 encoding. You can use a program to add Chinese data. If you use SQL statements to add data in cmd, an error message similar to Incorrect string value is returned: the '\ xB2 \ xE2 \ xCA \ xD4' for column 'title' at row 1 error occurs. The SQL statement is used to query the Chinese data added by the program.

Right-click the Border> Properties> option on the cmd interface and check that the cmd encoding method is GBK rather than UTF-8.

In fact, there is no garbled data in the database, but it is not the same as the cmd encoding method. The Chinese data presented in cmd is garbled, and the Chinese data cannot be added.

This problem does not exist if you use the MySQL graphical interface management tool.

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.