MySQL's Incorrect string value problem

Source: Internet
Author: User

In MySQL, a table is created manually by using commands. When a Chinese record is added to the page, an incorrect string value similar to the following is thrown: '\ xBB \ xF0 \ xD0 \ xC7' for column 1 row....

The reason is that the string encoding for table creation is inconsistent with the string encoding on the page.

Run the show create table t_info command to view the t_info encoding CHARSET = LATIN1,

Solution: drop table t_info and add

ENGINE = MyISAM AUTO_INCREMENT = 5 default charset = gb2312;

Of course, this statement will be set by default based on the settings during installation. If this type of problem occurs, it should be the Character Set Problem of the table.

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.