PDA

View Full Version : mysql max packet size


remlle
Wed 7th Jan '04, 1:46pm
I would like to make mysql start with a variable but I dont know how.
I need it to start with a max packet size of 8 meg. this is to allow users to uload files bigger than 1 meg. anyone who can help please do.
thanks so much

Steve Machol
Wed 7th Jan '04, 3:33pm
In addition to the vB settings, the allowed size of the attachments depends on the PHP and MySQL configuration. You may need to check and changechange the upload size for both PHP and for MySQL. Note, you'll need to have root access to the server to do this (or have your host do it.) Make these changes to php.ini:

upload_max_filesize = xM

..and my.cnf

set-variable=max_allowed_packet=xM

Change it to the size ('x') you want in Megabytes. Restart the webserver and MySQL after making these changes.

remlle
Thu 8th Jan '04, 6:04pm
where in my.cnf should I add this here is how my file looks

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
bind-address=127.0.0.1

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
max_allowed_packet=8M

as of now it is not making the sql allow a bigger file

Steve Machol
Thu 8th Jan '04, 7:23pm
Under the [mysqld] section.

remlle
Thu 8th Jan '04, 11:32pm
when I do that It hangs my Sql. it wont allow it to start. i have MySQL version 3.23.58
I dont know if this helps or not.

Steve Machol
Fri 9th Jan '04, 1:31am
It shouldn't cause this if it was edited correctly. What is the exact my.cnf you are trying to use?

remlle
Fri 9th Jan '04, 9:27am
[mysqld]
max_allowed_packet=8M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
bind-address=127.0.0.1

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

That is the entire my.cnf file. this file is found in etc/my.cnf
if you would like I can attach the actual my.cnf file for you to view
hope this helps out. when I try to use this file it does not start.

Steve Machol
Fri 9th Jan '04, 3:26pm
You are not entering the info correctly. Look at my post above:

set-variable=max_allowed_packet=xM

cerebro
Fri 9th Jan '04, 3:37pm
how to download the mem use


31214 mysql 9 0 80140 78M 1416 S 0.0 7.7 0:15 mysqld
32023 mysql 9 0 80140 78M 1416 S 0.0 7.7 0:28 mysqld
32074 mysql 9 0 80140 78M 1416 S 0.0 7.7 0:11 mysqld
32076 mysql 9 0 80140 78M 1416 S 0.0 7.7 0:15 mysqld
32097 mysql 9 0 80140 78M 1416 S 0.0 7.7 0:15 mysqld
32119 mysql 9 0 80140 78M 1416 S 0.0 7.7 0:10 mysqld


78 +78 +78 +78 = MySQL use too much memory :D
jejjee

remlle
Fri 9th Jan '04, 6:33pm
totally my fault. I am so sorry and thanks for the help this is one of the many things that make this software so great.