MySQL Set, Get max_allowed_packet

How to Set and Get Max_Allowed_Packet

This is to limit the Maximum byte limit for the mysql connection. We can set and get the maxminum allowed packet in mysql anytime by using below query.
Get MySQL max_allowed_packet

SHOW VARIABLES LIKE 'max_allowed_packet'

If you execute the above query it will print
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| max_allowed_packet | 1048576 |
+--------------------+---------+
1 row in set (0.00 sec)

To Set Mysql max_allowed_packet

mysql> set global max_allowed_packet = 5 * 1024 * 1024;
Query OK, 0 rows affected (0.00 sec)



Related Topic List of Mysql Error Code and Description
Increase MySQL connection Limit
Change Engine Type MySQL
Change MySQL Root Password
Mysql Change table name
SQL  MySQL  

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback