I installed Cyberpanel on Ubuntu 22.04.5 since a long time, more than 2 years, and doing regular updates for both Ubuntu and CP.
Everything was ok until I went for the update 2.4.4 and I got this above error message, I checked the differrent solutions and none were working for me.
In my case, after checking “/var/log/cyberpanel_upgrade_debug.log” the critical error lines are:
django.db.utils.OperationalError: (1045, "Access denied for user 'cyberpanel'@'localhost' (using password: YES)")
So I tested to login locally by using the password found in “/usr/local/CyberCP/CyberCP/settings.py”:
mysql -u cyberpanel -p -h localhost
and it failed
So the solution was to match the password and reset it in MariaDB directly (as root or another privileged DB user):
ALTER USER 'cyberpanel'@'localhost' IDENTIFIED BY 'the_correct_password';
FLUSH PRIVILEGES;
Once the database connection is fixed, retest the database password and re-run the upgrade.
This should allow the upgrade script to complete successfully!
Hope it will help