Mysql max_allowed_packet queries and modifies the size of data packets received by the server according to the configuration file. Sometimes large inserts and updates are limited by the max_allowed_packet parameter, resulting in failure. View the current configuration of www.2cto.com show VARIABLES like '% max_allowed_packet %'. The result is: + updated + --------- + | Variable_name | Value | + -------------------- + --------- + | max_allowed_packet | 1048576 | + -------------------- + --------- + the preceding description shows that the current configuration is 1 M modification method 1) method 1: edit my. cnf to modify (my. in the [mysqld] section or mysql server configuration section. Max_allowed_packet = 20 m if my. cnf cannot be found, you can use mysql -- help | grep my. cnf to find the my. cnf file. 2) method 2 (compromise and tangle) go to mysql server and run set global max_allowed_packet = 2*1024*1024*10 in the mysql command line. Then close the mysql server link and enter. Show VARIABLES like '% max_allowed_packet %'; check whether max_allowed_packet is successfully edited.