variable cant’t be set to the value of ‘null’

今天在导入数据库的时候,出现了下面的错误提示:

mysql根据配置文件会限制server接受的数据包大小。

有时候大的插入和更新会受max_allowed_packet 参数限制,导致写入或者更新失败。

查看目前配置

show VARIABLES like ‘%max_allowed_packet%’;

显示的结果为:

+——————–+———+

| Variable_name????? | Value?? |

+——————–+———+

| max_allowed_packet | 1048576 |

+——————–+———+

以上说明目前的配置是:1M

修改方法

1、修改配置文件

可以编辑my.cnf来修改(windows下my.ini),在[mysqld]段或者mysql的server配置段进行修改。

max_allowed_packet = 100M

 

 

variable cant’t be set to the value of ‘null’
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Scroll to top
0
Would love your thoughts, please comment.x
()
x