The Mysql database flushing script contains Chinese characters and garbled characters are read.

Source: Internet
Author: User

The script for Mysql database flushing contains Chinese characters. After logging on with the Mysql command, it is flushed into the database and garbled during reading. The possible causes are as follows:
After mysql is installed, the client connection code is not modified. The default value is latin1. Use the mysql command to log on directly to source,
The data to be flushed is latin1 encoded. Www.2cto.com solution: 1. add the parameter [html] <span style = "white-space: pre"> </span> mysql <span style = "color: # ff0000 during mysql Command logon; "> -- default-character-set = utf8 </span>-u XXX-pXXX 2. modify my. cnf (directory in/etc/my. cnf), add the following code in [client]: [html] <span style = "white-space: pre"> </span> default-character-set = utf8 author fellting

Related Article

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.