MySQL #1406-Data too long for column error Solution

Source: Internet
Author: User
Tags wordpress database

Over the past two days, I have been tossing WordPress, upgrading the system, adding various plug-ins, and then setting up the environment at home to start debugging. Everything went smoothly. After using the WordPress Database Backup tool to back up the file, the gz file is sent to my mailbox, but the problem occurs when the company is preparing to import the Backup file, always Report #1406-Data too long for column error. I checked some information and said I want to modify my. ini does not feel credible.

Check the imported SQL file carefully and find that ENGINE = MyISAM AUTO_INCREMENT = 2 DEFAULT CHARSET = latin1 is used for creating each table. The encoding uses latin1, so it is changed to UTF-8. Import again. You can import it, but it is only a part of it. You still cannot import it all. Continue to observe and find that most of the content in the table wp_comments cannot be imported, all these are spam messages (many strange symbols are used in spam messages). The spam messages are deleted and imported successfully.

Finally, we recommend you to query the mysql error code:

Http://dev.mysql.com/doc/refman/5.1/en/error-handling.html

Http://dev.mysql.com/doc/refman/5.1/zh/error-handling.html Chinese

Okay, you can continue the study! :)

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.