[ERR] 1153 - Got a packet bigger than 'max_allowed_packet' bytes 解决方法

简介

max_allowed_packet 表示MySQL客户端和服务器之间,单条消息最大允许传输的数据包大小。

如果单条SQL插入或更新的数据包超过此大小,就会报错:
[ERR] 1153 - Got a packet bigger than 'max_allowed_packet' bytes

官方解释:

max_allowed_packet sets an upper limit on the size of any single message between the MySQL server and clients, including replication slaves. If you are replicating large column values (such as might be found in TEXT or BLOB columns) and max_allowed_packet is too small on the master, the master fails with an error, and the slave shuts down the I/O thread. If max_allowed_packet is too small on the slave, this also causes the slave to stop the I/O thread.

MySQL 1819 - Your password does not satisfy the current policy requirements

mysql修改密码时提示:
1819 - Your password does not satisfy the current policy requirements

产生的原因:
自定义密码太简单,不符合mysql的密码策略

解决方法:
方法一:修改密码至符合mysql的密码策略(建议)。
方法二:如果必须用简单密码,可以修改密码策略;