Backup fail after upgrade to Virtualmin

17 posts / 0 new
Last post
#1 Wed, 01/07/2015 - 14:27

Backup fail after upgrade to Virtualmin

Just upgraded the wbm-virtual-server package to 4.13-1 and then tried a backup of a virtual server. Got this error:

Dumping MySQL database api .. .. dump failed!

mysqldump: Got error: 1045: Access denied for user 'api'@'localhost' (using password: YES) when trying to connect Backup failed! See the progress output above for the reason why.

The backup worked fine yesterday before the Virtualmin package update this morning.

  • Rob
Wed, 01/07/2015 - 16:35

Same exact problem here

Wed, 01/07/2015 - 17:14

Same problem here on Debian GNU/Linux 7.7.

  • virtual-server-4.13.gpl
  • webmin-1.730
  • usermin-1.640
  • mysql-5.5.40-0+wheezy1

File /etc/webmin/mysql/config exists and the correct mysql root password is stored as pass= (I don't know if this is relevant). When I execute a backup manually:

virtualmin --id xxx

...the first output line is:

user= pass=

Wed, 01/07/2015 - 17:51

Same exact problem here (centos 6.6)

Wed, 01/07/2015 - 18:08

Same here, I investigated, only one of my servers backuped normally and it happened that it had the same password as the mysql admin password.

When I changed mysql admin password in webmin to match password of my other servers, my servers backuped.

So it seems that backup routine is broken and now uses the mysql admin password whatever is the server it tries to backup ..

Please help

Wed, 01/07/2015 - 19:56


Sorry to hear you're having problems with the backups! There's a bug report regarding that issue here:

Thu, 01/08/2015 - 01:11 (Reply to #6)

same problem with the backups :-/

cannot access the link you posted :-(

"... Access denied You are not authorized to access this page. ..."

EDIT: after reentering my login credentials I could access the bug report

Thu, 01/08/2015 - 04:36

Ubuntu Linux 12.04.3

Thu, 01/08/2015 - 05:22
Welshman's picture

Same problem on all my servers as of last night.

First nightly backups after recent Webmin and VM updates.

Deb7 Ubuntu 12.04 & 14.04

Any idea when a fix is coming.


Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Thu, 01/08/2015 - 14:47

There is a quick fix for this from JamieCameron ( Many thanks!

Fri, 01/09/2015 - 03:03

Chalk another person up with this MySQL error causing failed backups problem.

Also; I apparently am not authorised to see those links to a quick fix.

Fri, 01/09/2015 - 03:09

You need to create an account (and be logged in) to view the comment with the quick fix in it.

Fri, 01/09/2015 - 07:16

[quote] For those who need a quick fix for this (which reverts Virtualmin to the old insecure behavior of writing backups with root permissions can do the following :

Edit the file /usr/{share,libexec}/webmin/virtual-server/

Change lines 947-948 to :

    local $err = &mysql::backup_database($db, $dbfile, 0, 1, undef,
                                 undef, undef, undef, undef, 1);

Run /etc/webmin/restart [/quote]

Sat, 01/10/2015 - 07:36

or read this :

The simpler fix is to edit /etc/webmin/mysql/config and add the line login=root

it works...

Sat, 01/10/2015 - 12:47

"The simpler fix is to edit /etc/webmin/mysql/config and add the line login=root" Thanks! this is OK Will this be in the next We min/Virtualmoin release?

Sun, 01/11/2015 - 04:05
Joe's picture

Fixed in 4.13-2. Apologies for the inconvenience.


Check out the forum guidelines!

Sun, 01/11/2015 - 04:33

update just installed, i have removed the "login=root" in /etc/webmin/mysql/config

works fine ^^ thanks you !

Topic locked