My.cnf parameters not saving

Operating system: CentOS Linux 7.9.2009
OS version:
Webmin version 1.960
Virtualmin version 6.13.pro

MySQL Database Server MariaDB version 5.5.68

in virtaulming edit Config Files I have set
max_connections = 1800

I have saved and restarted the database.
when I view the my.cnf file as well as edit it through mysql I see the value as ‘1800’

however when I view from MySQL System Variables I see this
max_connections 214

I’m getting connection issues with number of connections, so I think the value of 1800 is not being saved.

I have another server and tried this same settings and it appears fine(i.e. max-connections is showing as changed in both places)

I read somewhere about setting a value for “open files” but that didn’t seem to have any effect.

any help appreciated.

Brian

I logged in on command line as root and used commands to set the max_connections
that seems to have worked.

I also see it in GUI through MySQL System Variables
I’m not sure why the settings didn’t take but hopefully at least I have enough connections now.

I’ll double check that I have made the setting persistant.
I tried to use
SET PERSIST max_connections=2000;
but get this:
ERROR 1193 (HY000): Unknown system variable ‘PERSIST’

I see the updated value in config file but on a mysql restart the max_connections returns to 214

Brian

Hi,

You would need to edit configuration manually and add under [mysqld] section open_files_limit param as well.

Example:

[mysqld]
...
...
...
...
max_connections = 1800
open_files_limit = 4096

fantastic !!!
works a treat

you guys help as ever always appreciated

Glad to be helpful.

Thank you for using Virtualmin. Enjoy!