Mysql 5.1 started to encounter a large packet problem, when importing data with the client, encountered error code: 1153-got apacket bigger than ' Max_allowed_packet ' bytes, the database terminated the operation of data import.
Cause analysis: MySQL limits the maximum data value for each insert operation, exceeding the maximum value to report the above error.
After-depth study found:
Both the database client and the database server terminal have their own max_allowed_packet variables, so if you intend to handle large packets, you must increase the value of the variable configuration on the client and server.
In general, the server default max-allowed-packet is 1MB, the client's max-allowed-packet is 16MB.
The MySQL side modifies the max-allowed-packet values by:
Add the Max_allowed_packet attribute to the MySQL configuration file My.ini:
Note that it must be added under [mysqld]-;
Finally, then restart MySQL. Whether the test succeeded =========================================================================== Select the database F6 in the Navacat or right-click into the console command mode to enter the code "note to the end of the semicolon"; show VARIABLES like '%max_allowed_packet% ';
test success;
Fix MySQL Error: Got a packet bigger than ' Max_allowed_packet ' bytes