MySQL garbled problem in command line

Source: Internet
Author: User

1. Phenomena

On the command line, execute the SQL statement if it contains a question that says "Data too long for column name ' at row 1" or the result in the command line query, Chinese garbled 2. Analyze A. View the default encoding of the command line: Right-click the command line title bar--Properties--current code page B. Viewing the encoding of the client and result set in MySQL show variables like ' character% ';, you can see that the client and the result set encoding is UTF8 problem found, command line and MySQL encoding method is not the same as the result of garbled; 3. Workaround first stop the MySQL service, and then locate the My.ini in the MySQL installation directory, locate the client section, and change the default character to GBK OK.

MySQL garbled problem in command line

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.