解决办法:
修改mysql配置文件:
1 | [mysqld] |
2 | max_allowed_packet=1024M |
即可解决
linux的mysql配置文件在这里:
1 | /etc/mysql/my.cnf |
附这个配置不足的时候的各种报错:
1 | ERROR 1231 ( 42000 ): Variable ' time_zone ' can ' t be set to the value of ' NULL ' |
2 | ERROR 1231 (42000): Variable ' sql_mode ' can ' t be set to the value of ' NULL ' |
3 | ERROR 1231 ( 42000 ): Variable ' foreign_key_checks ' can ' t be set to the value of ' NULL ' |
4 | ERROR 1231 (42000): Variable 'unique_checks ' can ' t be set to the value of ' NULL ' |
5 | ERROR 1231 ( 42000 ): Variable ' character_set_client ' can ' t be set to the value of ' NULL ' |
6 | ERROR 1231 (42000): Variable ' collation_connection ' can ' t be set to the value of ' NULL ' |
7 | ERROR 1231 ( 42000 ): Variable ' sql_notes ' can ' t be set to the value of ' NULL ' |