Troubleshooting
Problem
When you create a Data Source in Guardium for a MYSQL database, an error like the following is displayed:
[]Could not connect to: jdbc:mysql://192.168.102.124:3306/SAMPLE?autoReconnect=true’ for user: ‘MYSQL test_MYSQL(Security Assessment)’.
DatasourceConnectException: Could not connect to: ‘MYSQL MYSQL test 192. 168.102.124:3306’ for user: ‘guardvatest’.
MySQLNonTransientConnectionException: Could not create connection to database server.
Attempted reconnect 3 times. Giving up. SqlState: 08001 Error Code: 0[
]
Cause
In the error message:
The IP of the MYSQL database server is
192.168.102.124
The user name is guardvatest
The database that cannot be accessed is SAMPLE
The user
guardvatest
does not have connect privileges to database SAMPLE
at database server 192.168.102.124
from the Guardium appliance
Resolving The Problem
- Ensure that the MYSQL database can accept remote connections.
- Grant the required privileges for the user to connect from the Guardium appliance.
For instance, if the IP address of the Guardium appliance is 192.168.102.123:
GRANT SELECT ON SAMPLE.* TO 'guardvatest'@'192.168.102.123' identified by 'xxxxx';
To enhance security, the level of privileges must be granted as minimally necessary.
If the appropriate privileges have been granted and the credentials have been verified to be correct, but the data source connection still fails with the same error, it is possible that the MYSQL database server has locked out the connection from the Guardium appliance due to excessive login failures. In order to correct this, execute the following command in the mysql database using the the appropriate user credentials:
mysqladmin flush-hosts
Wait for a few seconds and retry connection test from the Guardium datasource connection test.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21685610