Backup error regarding databases

plague

Well-Known Member
Sep 22, 2006
68
15
158
Brasil
cPanel Access Level
Root Administrator
Twitter
Hello.

Today I found a server that was not doing database backups.
This server had the "Allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration? " option enable in Tweak Settings, so Cpanel added the open-files-limit twice in the config file, one inside [mysqld] tag and another inside the [mysqldump] tag in my.cnf file:

Code:
[mysqldump]
quick
quote_names
max_allowed_packet = 256M
open-files-limit=32000
And this broke mysqldump:

Code:
[2019-09-27 02:14:32 -0300] Determining mysql dbs.../usr/bin/mysqldump: unknown variable 'open-files-limit=32000'
Use of uninitialized value $mysqldump_ver in concatenation (.) or string at /usr/local/cpanel/Cpanel/Pkgacct/Components/Mysql.pm line 124
The system did not reconize it as an error, so the backups final report was success:

Code:
[2019-09-27 04:47:17 -0300] info [backup] Completed at Fri Sep 27 04:47:17 2019
[2019-09-27 04:47:17 -0300] info [backup] Final state is Backup::Success (0)
[2019-09-27 04:47:17 -0300] info [backup] Sent Backup::Success notification.
But the server was not backing up any mysql databases because of this config error.

If you use any tag other then [mysqld] in your my.cnf, check your server.
 

plague

Well-Known Member
Sep 22, 2006
68
15
158
Brasil
cPanel Access Level
Root Administrator
Twitter
It's open_files_limit and not open-files-limit

And I believe cPanel also sets it correctly using the underscores instead of dashes.
Both hyphen and underscore are correct (cpanel adds it with hyphen) and this was not the problem reported in my post.
"... Cpanel added the open-files-limit twice in the config file, one inside [mysqld] tag and another inside the [mysqldump] tag..."
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,537
699
263
Houston
cPanel Access Level
DataCenter Provider
I've not seen this behavior on any servers thus far - can you provide replication steps down to the version of MySQL and cPanel you're running?

I have the following set:

Code:
Allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration? [?]
cPanel & WHM will use your total number of tables to adjust the open_files_limit value during each MySQL restart.
But am not experiencing this issue, even with it added twice.