Symptoms
After upgrading your server to MariaDB 10.5, you might encounter this error when accessing PhpMyAdmin from the cPanel interface:
mysqli_connect(): (HY000/4151): Access denied, this account is locked
Description
This error is taking place because the account is locked inside of MariaDB. If you run the below query inside of MariaDB, it will confirm if an account is locked or not:
(In this example below, "cpaneltech" is the name of the cPanel account that is encountering these errors):
MariaDB [(none)]> SHOW CREATE USER 'cpaneltech'@'localhost'; +---------------------------------------------------------------------------------------------------------------+ | CREATE USER for cpaneltech@localhost | +---------------------------------------------------------------------------------------------------------------+ | CREATE USER `cpaneltech`@`localhost` IDENTIFIED BY PASSWORD '*89300BD9AA16238C701635EF70FB99CC4E9919E5'. | +---------------------------------------------------------------------------------------------------------------+
As it can be shown above, the value ACCOUNT LOCK confirms that the account is currently locked. The account locking function permits the administrator to lock/unlock user accounts. No new client connections will be permitted if an account is locked (existing connections are not affected).
Workaround
To resolve this, you will need to unblock the user inside of MariaDB. This can be done using the following command from the command line.
(In this example below, "cpaneltech" is the name of the cPanel account that is encountering these errors):
mysql -e "ALTER USER 'cpaneltech'@'localhost' ACCOUNT UNLOCK;"
Comments
0 comments
Article is closed for comments.