Mysql Text Type field store hint error message String data,right truncated:1406 data too long for column ' content ' at row 1

Source: Internet
Author: User
Tags mysql text mysql command line truncated

String data,right truncated:1406 data too long for column ' content ' at row 1 when MySQL is prompted as follows:1. First look at the size of the text content deposited, set the type according to the content sizeIf exceeded, type of replacement based on size2, if it is still beyond that could be MySQL depending on the configuration file, the server accepts packet size, and sometimes large inserts and updates are limited by the Max_allowed_packet parameter, resulting in a write or update failure. View current configuration: The code is as follows: The current configuration is: 1 M Modify the configuration file can be edited my.cnf to modify (under Windows My.ini), in the [mysqld] section or MySQL server configuration section to modify. The code is as follows: Max_allowed_packet = 20M If no my.cnf can be found by code as follows: MySQL--help | grep my.cnf to find the my.cnf file. Under Linux the file is under/etc/. 2, in the MySQL command line to modify the MySQL command line run: The code is as follows: NOTE: This modification will error:mysql> set MAX_ALLOWED_PACKET=16MB; ERROR 1232 (42000): Incorrect argument type to variable ' max_allowed_packet ' then exit the command line, restart the MySQL service, and then enter. /etc/init.d/mysqld start Failure to view: http://lixiangfeng.com/blog/article/content/7812788 code is as follows: Show VARIABLES like '%max _allowed_packet% '; To see if Max_allowed_packet is editing success Note: This value is set too high to cause a single record to fail after the limit is written to the database, and subsequent record writes will fail. Original link: http://lixiangfeng.com/blog/article/content/7813174 If reproduced please keep the original link!! Thank you

Mysql Text Type field store hint error message String data,right truncated:1406 data too long for column ' content ' at row 1

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.