Connecting Tech Pros Worldwide Help | Site Map

Modify max allowed packet

Newbie
 
Join Date: Oct 2006
Posts: 14
#1: Jan 29 '07
I am already using MySql 5 and is currently working on a code to save pictures to a table. How can I modify the max_allowed_packet system variable?
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#2: Jan 29 '07

re: Modify max allowed packet


It's all in the standard documentation of MySQL:

Quote:

Originally Posted by MySQL doc

If you are using the mysql client program, its default max_allowed_packet variable is 16MB. To set a larger value, start mysql like this:

shell> mysql --max_allowed_packet=32M
That sets the packet size to 32MB.

The server's default max_allowed_packet value is 1MB. You can increase this if the server needs to handle big queries (for example, if you are working with big BLOB columns). For example, to set the variable to 16MB, start the server like this:

shell> mysqld --max_allowed_packet=16M
You can also use an option file to set max_allowed_packet. For example, to set the size for the server to 16MB, add the following lines in an option file:

[mysqld]
max_allowed_packet=16M

Ronald :cool:
Newbie
 
Join Date: Oct 2006
Posts: 14
#3: Jan 30 '07

re: Modify max allowed packet


Thanks Ronald.
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#4: Aug 28 '08

re: Modify max allowed packet


Ronald,

How can you set-up the packet size on a Novell Box?

thanks,
MM
Reply