Troubleshoot for Root Access Denied on MySqlDump


We received an automatic email saying the mysqldump: Got error: 1045: “Access denied for user ‘root’@’localhost’ (using password: YES)” when trying to connect and this is related to automysqlbackup.

When we test this by running:


the error will show up and the backup file on /var/lib/automysql/daily are very small and when unzipped it’s no content at all.

We are not sure what caused this to stop working as the other virtual server are working ok for automysqlbackup.

Temporary Solution

The automysqlbackup has a config file: /etc/default/automysqlbackup and by default the password is getting from /etc/mysql/debian.cnf which confirmed is correct one

PASSWORD=`grep password /etc/mysql/debian.cnf | tail -n 1 | cut -d"=" -f2 | awk '{print $1}' `

So we decided to uncomment this line to hardcoded into:


Tested and the SQL backup worked OK.

At this stage, this is a temporary solution and we are still digging into it.

The End

If you have reached the end of this article, congratulation. Hopefully, I have been able to shed some light on outlining what you need to know to troubleshoot the access denied on mysqldump.

I write this in such a way that this is not a fixed article. Like in this journey, I learn as I go and I re-write some parts of the article so please keep pinging with this article or any tech posts.

I also would love to hear about how you deal with the situation and what IT-related challenges you might be facing. Please feel free to leave us a comment below this article or you can contact us on the Dewacorp website for your IT support, application integration, application development, or other IT-related. Alternatively, you can casually have a chat on Dewachat. Let us know if you have any questions that we can help with!

Big thank you for the photo by Negative Space from Pexels.

If you want to boost your product and service to the wider web community, you can visit our Dewalist classified website – home to 15,000+ active users and 25,000+ active advertising so far. Check it out!

If you love this article or any tech posts and you would like to receive an update of this article or our latest post, please sign up for the form below:

Newsletter signup

This is a newsletter for tech, creative, gadgets, games and crypto.

Please wait...

Thank you for sign up!