# is max\_allowed\_packet a dynamic variable

**URL:** <https://forums.percona.com/t/is-max-allowed-packet-a-dynamic-variable/1691>\
**Category:** Other MySQL® Questions\
**Created:** [October 21, 2011, 1:19am UTC](https://forums.percona.com/t/is-max-allowed-packet-a-dynamic-variable/1691 "2011-10-21T01:19:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![justlooks](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@justlooks](https://forums.percona.com/u/justlooks)\
**Post date:** [October 21, 2011, 1:19am UTC](https://forums.percona.com/t/is-max-allowed-packet-a-dynamic-variable/1691/1 "2011-10-21T01:19:13Z")

</div>

i see max\_allowed\_packet is a dynamic variable in doc  
but i changed it’s value ,still have problem,why?

ysql\> show global variables like ‘max\_allowed\_packet’;  
±-------------------±--------+  
| Variable\_name | Value |  
±-------------------±--------+  
| max\_allowed\_packet | 1048576 |  
±-------------------±--------+  
1 row in set (0.00 sec)

mysql\> set global max\_allowed\_packet=61456384;  
Query OK, 0 rows affected (0.00 sec)

mysql\> source /tmp/trade\_ft.sql;  
ERROR 1153 (08S01): Got a packet bigger than ‘max\_allowed\_packet’ bytes  
mysql\> show global variables like ‘max\_allowed\_packet’;  
±-------------------±---------+  
| Variable\_name | Value |  
±-------------------±---------+  
| max\_allowed\_packet | 61456384 |  
±-------------------±---------+  
1 row in set (0.00 sec)

Command-Line Format --max\_allowed\_packet=#  
Option-File Format max\_allowed\_packet  
Option Sets Variable Yes, max\_allowed\_packet  
Variable Name max\_allowed\_packet  
Variable Scope Global  
Dynamic Variable Yes  
Permitted Values  
Type numeric  
Default 1048576  
Range 1024 … 1073741824

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [October 21, 2011, 5:54am UTC](https://forums.percona.com/t/is-max-allowed-packet-a-dynamic-variable/1691/2 "2011-10-21T05:54:42Z")

</div>

You changed the global value, but your session still has the old session value.
