Database Management
Error "Failed to obtain JDBC connection" after changing MySQL authentication plugin in DPA
After changing the MySQL authentication plugin from mysql_native_password to caching_sha2_password, the connection fails with an error.
First published date
Last published date
Overview
When monitoring a MySQL instance in DPA and changing the MySQL authentication plugin from mysql_native_password to caching_sha2_password, you must update the connection settings in DPA and enable the MySQL Driver option.
If this step is skipped, DPA may fail to connect to the monitored instance and display the error:
Failed to obtain JDBC connection
Product section
Cause
The error occurs after updating the monitored MySQL user's authentication plugin from mysql_native_password to caching_sha2_password without updating the DPA database connection to use the MySQL Driver option.
Resolution
Follow the steps below in order:
-
Restart the MySQL database server
Restart the MySQL server hosting the monitored instance to ensure all authentication/plugin changes are fully applied.
-
Unblock the DPA application server IP
From the MySQL database server, run the following command to clear blocked hosts (including the DPA application server, if it was temporarily blocked due to failed connections):
mysqladmin flush-hosts -
Restart the DPA service
On the DPA application server, restart the DPA service (also known as the Ignite PI service).
-
Update the DPA connection to use the IP address
In the DPA UI:
-
Go to the Update Connection page for the affected MySQL instance.
-
Edit the connection and use the IP address of the MySQL server instead of the server name/hostname.
-
-
Enable the MySQL Driver option
Still in the Update Connection wizard for the affected instance:
-
Locate and select the MySQL Driver checkbox.
-
Click Next and complete the update wizard.
-
After completing these steps, the Database connection should update successfully, and the error "Failed to obtain JDBC connection" should no longer occur for this MySQL instance.