MySQL import source times wrong MySQL error 1153 (08s01) Max_allowed_packet not big enough
Recently need to import MySQL backup files, when using the source command to import, but reported the following error: Error 1153 (08S01): Got a packet bigger than ' Max_allowed_packet ' bytes
The error message also basically tells us the reason for the error. Max-allowed_packet limits the maximum value allowed for import, since we know why, we can fix the MY.CNF configuration file. Is the configuration file Max_allowed_packet configuration item setting problem, the default setting (or not set) is 1M, if the import file is more than 1M, will report this error, modify the MY.CNF, in the [mysqld] area plus or modify the configuration item, the value is changed, such as: Max _allowed_packet = 20M, then restart MySQL.
You can also view the value of this configuration item at the command line:
Show VARIABLES like '%max_allowed_packet% ';
The returned result is a number of bytes, such as 1048576, which is 1M.
OK, modify the file size to be configured to the one you want to import. So again source, success!
MySQL in the relevant Chinese configuration can refer to: MySQL configuration file my.cnf Chinese version, if you want to know MySQL configuration optimization, can refer to: My.ini configuration parameters in Chinese detailed description and optimize configuration settings
This article is from the "Network Engineering topic" Blog, please be sure to keep this source http://houzhibo.blog.51cto.com/3103241/1597816
Linux MySQL ERROR 1153