Remember once MySQL storage, text garbled problem

Source: Internet
Author: User
Tags mysql connection string

recently, a tool has been developed using ADO to parse a log merge library (MYSQL) as follows
All-xx:panax notoginseng: [INFO ] rolename=♣, Innova, orderid=  1408190037102121039, price=10.0, point=
found in the rolename in the storage after the ♣ display as-garbled, the first thought is the table coding problem, after the confirmation is Utf-8 coding wood problem, and later ruled out the file encoding and the code string are not garbled problem, with empirical analysis, may be the problem of the connection string it, The Utf-8 encoded parameter option was added to the MySQL connection string and the test was OK.
server=10.10. 10.10; convertzerodatetime=true;characterset=utf8;checkparameters=false;allowuservariables=true;user ID =xxxx;password=xxx;port=3316; Integrated security=false

The Characterset=utf8 in the above connection string is the processing option for character encoding.

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.