Cyberpanel backups

I’m having a confusing problem with cyberpanel backups. I have spent hours through cyberpanel python code modules, and added some debug messages to track what is happening.

  1. I found in codes that cyberpanel uses the ‘root’ account to access the database, while the actual centos user that running the code is ‘cyberpanel’, so an error “mysqldump: Got error: 1045: “Access denied for user ‘root’@‘localhost’ (using password: YES)” when trying to connect”.

  2. Sometimes the scheduled incbackups are executed by the centos ‘cyberpanel’ user, while other times are executed by the ‘root’ account. And also, the connection to database failed due to that centos user ‘cyberpanel’ is trying to use the ‘root’ database account.

as you can see in the screenshot below: I am printing the centos user that executing the code and its uid.

Please any support to solve…

Any support with backups please…!!

Did you changed the mysql root password?

The problem was due to incorrect reading of configurations from .my.cnf of root account and cyberpanel account as well. I had to put the password between double quotes “”, and that solved the error.