Symptoms
Logins to phpMyAdmin fail and one of the following errors is displayed.
CONFIG_TEXT: mysqli_connect(): (HY000/2059): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/local/cpanel/3rdparty/lib/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory error.
CONFIG_TEXT: mysqli_connect(): (HY000/2061): Authentication plugin 'sha256_password' reported error: Authentication requires SSL encryption
Cause
MySQL's "Password Validation" component can conflict with various applications, such as phpMyAdmin. Such conflicts will cause mysql user logins to fail.
Resolution
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
-
Run the following command to verify that the "Password Validation" component is not installed.
# mysql -e "SHOW VARIABLES LIKE 'validate_password%'"
-
If the previous command returns any results, run the following command to uninstall the "Password Validation" component.
# mysql -e "UNINSTALL COMPONENT 'file://component_validate_password'"
-
Run the following command to locate all MySQL users configured to use the
caching_sha2_passwordplugin.# mysql -e "SELECT User FROM mysql.user WHERE Plugin = 'caching_sha2_password' AND User NOT LIKE 'mysql%';"
CPANEL_WARN: Keep in mind that only the cPanel users need their plugins updated, MySQL system accounts do not need to be modified.
-
Run the following command for each user found by the previous command.
# mysql -e "ALTER USER '$mysqlusername'@'localhost' IDENTIFIED WITH mysql_native_password BY '$newmysqluserpassword'"
CPANEL_WARN: "$mysqlusername" must be replaced with the MySQL user's username, and "$newmysqluserpassword" must be replaced with the new password for the MySQL user.
Additional resources
Password Validation Component Installation and Uninstallation
Comments
0 comments
Article is closed for comments.