Resolving MySQL Authentication Issues related to caching_sha2_password

Resolving MySQL Authentication Issues related to caching_sha2_password

The following errors are commonly encountered while connecting to MySQL databases:

  1. Public Key Retrieval is not allowed.

  2. Client does not support authentication protocol requested by server.plugin type was-'sha256_password'.

  3. RSA public key is not available client side (option serverRsaPublicKeyFile not set).

  4. Unable to load authentication plugin 'caching_sha2_password'.

  5. Plugin 'mysqlL_native_password' is not loaded.

 Cause:


Starting with MySQL 8.0, the default authentication plugin is ,caching_sha2_password which is not supported by Applications Manager versions older than 173100. This mismatch often leads to authentication errors.

Solution:

  1. Change Authentication Plugin to mysql_native_password  (If possible)

    1. For existing users:

      1. ALTER USER '<user>'@'<appmanager_host>' IDENTIFIED WITH mysql_native_password BY 'your_password';  (OR)

    2.  To create anew user: (Ref KB)

      1. CREATE USER '<user>'@'<appmanager_host>' IDENTIFIED WITH mysql_native_password BY 'password';


NotesNote:
  • <user>: Replace with the MySQL username.

  • <appmanager_host>: Replace with the AppManager host.

  1. Enable SSL in MySQL Server (Optional)

    1. If possible, enable SSL on the MySQL server. Follow the steps mentioned in KB to import the certificate in appmanager to monitor the SSL enabled MySQL DB Servers

  2. Apply Patch

    1. Request a Patch: If your are using appmanager lower than 173100 version, contact support to obtain a compatible patch based on your current AppManager version.

                  New to ADSelfService Plus?