IBM Support

SQLState 08001 when creating Guardium DataSource to MYSQL

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 userguardvatest does not have connect privileges to database SAMPLE at database server 192.168.102.124 from the Guardium appliance

Resolving The Problem

  1. Ensure that the MYSQL database can accept remote connections.
  2. 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.

[{"Product":{"code":"SSMPHH","label":"IBM Security Guardium"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.1;9.0;8.2;8.1","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21685610