Increased the max_allowed_packet but it changed back :(

13 posts / 0 new
Last post
#1 Thu, 02/04/2010 - 07:37
Anonymous

Increased the max_allowed_packet but it changed back :(

Hi, I used VitalMin to edit the MYSQL System variables

so that I could increase the size of mysql queries.

I increasd it from the 1MB ( 1048576 ) up to

32 MB ( 33554432) and hit the save button.

Then I rebooted the Mysql server.

When it came back up it had reverted back to the 1MB limit.

How do I make the change permanent ?

thanks.

Thu, 02/04/2010 - 11:12
andreychek

Howdy,

Whenever you make changes in the Webmin MySQL module, the value should appear in the my.cnf file in /etc.

Try making the changes again, do they appear in the file?

If not, are you sure you're hitting "Save" and/or "Apply"?

-Eric

Fri, 02/05/2010 - 00:37
Davvit

I made the change again, and saved it.

Then I checked that file ( /etc/my.cfg )

and there is no line about that change.

this is what I have in that file:

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

old_passwords=1

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

So I guess something is not working, should I just put a line in manually ?

How do I format it ?

Say I want to increase it to 5MB

Do I just write this in the my.cfg file ?

max_allowed_packet =5242880

what line should I write it on ?

Thanks for your help.

Fri, 02/05/2010 - 07:59
andreychek

If you look in Webmin -> Servers -> MySQL Database, click the "Module Config" at the top, and go into System Configuration, what is "MySQL configuration file" (at the bottom) set to?

-Eric

Fri, 02/05/2010 - 08:43
Davvit

Actually it is set to /etc/my.cnf

( not /etc/my.cfg )

But there isn't a my.cfg - so I must have assumed it was .cfg when looking for my.something in /etc

the contents are:

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

old_passwords=1

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

Fri, 02/05/2010 - 08:45
andreychek

Yeah, /etc/my.cnf should be correct.

I'm not really sure what's going on then, it sounds like you may need to file a bug report, as it may not be updating the config file properly.

-Eric

Fri, 02/05/2010 - 09:37
Davvit

As I said though,

Can I add a line to force an permanent update ?

Say I want to increase it to 5MB

Do I just write this in the my.cnf file ?

max_allowed_packet =5242880

If so:

How do I properly format it and what line should I write it on ?

Thanks

Fri, 03/11/2011 - 04:32
firestar

Hi there.

I am using Virtualmin 3.83 and have the same problem. How do I get to the my.cnf file? As is it not being updated from the MySql module.

Thanks,

Fri, 03/11/2011 - 08:57
andreychek

You could try making the changes manually from the command line, to see if that works.

To do that, log into your server over SSH as root, and look for my.cnf in the /etc directory.

Add your desired parameters to it, then restart MySQL.

In theory, Webmin should save changes to the my.cnf though... make sure you're hitting "Apply".

If you are, you may want to file a bug report, explain what steps you're taking, and what's happening when you do that.

-Eric

Fri, 03/11/2011 - 10:37
firestar

Thanks Eric.

I am trying to change the query_cache_size.

When I try through webmin -> MySql Server -> MySql System Variables I get to edit the variable and then I am asked to 'Save' - no option to 'Apply'. And as said previously, the value returns to 0 when the server is restarted.

On the other hand, via SSH - I get to the /etc directory I type in vi my.cnf and I get something mentioned before:

[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql Default to using old password format for compatibility with mysql 3.x clients (those using the mysqlclient10 compatibility package). old_passwords=1 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid

Am I doing something wrong?

Thanks.

Mon, 03/14/2011 - 09:17
firestar

I think I figured this out. I had to change query_cache_size. Just typed in query_cache_size = 5Mb under the [mysqld] area.

Thanks.

Mon, 09/23/2013 - 10:26
jjw

Just wanted to post a note that this just happened to me, as well. I'm running a clean CentOS 6.4 installation.

Wed, 12/03/2014 - 00:17
Francewhoa
Francewhoa's picture

Confirming this issue is resolved in Virtualmin 4.12 GPL

To change the "max_allowed_packet" using Webmin navigate to "Servers > MySQL Database Server > MySQL Server Configuration > Maximum packet size": X MB Click on "Save and Restart MySQL" button

- - -
Senior Product Manager, and Co-Founder at Ubertus.org Inc.
Love back your Virtualmin & Webmin community

Topic locked