mysqldump: Got error: 1044: Access denied for user

When I try and backup a domain, I get this error:

mysqldump: Got error: 1044: Access denied for user ‘root’@‘localhost’ to database…

I created the database using the vm database guey… why can’t root access it?

Please help

Hi Alex,

Is it possible that at some point, perhaps the MySQL password changed?

If you run this:

grep pass= /etc/webmin/mysql/config

You’ll see what the current MySQL root password is set to (don’t post it here!).

What happens if you run this from the command line:

mysql -u root -p

And when prompted, type in the password you see above. Are you able to get into MySQL that way?
-Eric

Howdy,

The following command will give you the password that Webmin is trying to use (don’t post it here!):

grep pass= /etc/webmin/mysql/config

Now, what happens if you enter the above password after typing this:

mysql -u root -p

Does it let you into MySQL, or do you get an Access Denied message?
-Eric

Hey Eric,

Thanks alot. It’s the wrong PW.

I changed the root pw outside of virtualmin, that’s why it probably doesn’t work.

Thanks a ton,

Alex

Well… so I can successfully login, but now when I try and dump certain databases, root still doesn’t have permission.

How can I make it so root has access to all db’s?

I tried editing database permissions, adding root and giving root access to Any database… but that didn’t work.

Anyone know?

Thanks!

In theory, root should have permissions to all the databases.

If you log into Virtualmin, choose "Webmin" on the top-left, go into Servers then MySQL Database Server, and then choose Module Config – you can set your new root password there.

Does setting that help at all?
-Eric

Yeah, I changed the root password and it’s the same in all places now, but for some reason root still doesn’t have access…

Hmm, in the off-chance that it’s a cache problem somewhere, does restarting Webmin help?

/etc/init.d/webmin restart

Thanks again.

Did that… still no luck!

Hrm, well, I’m running low on ideas! :wink:

To make sure I understand the problem – you’re saying that when you attempt a system backup, that some user databases, but not all user databases, are successfully backed up? And for the ones that aren’t, you receive a permission denied error when it tries to access the DB?
-Eric

Yeah, when I go to back up the backup halts because root doesn’t have access to the first database it tries to dump.

Maybe I need to open a ticket with the admin…

Yeah, opening a ticket may not be a bad idea.

However, since it’s the first domain that breaks, I’d make 100% sure that you have the correct root password listed in there :slight_smile:
-Eric