Connection Issue with the JDBC Source

Hi,
I am trying to establish a connection with a JDBC Source in tenant, but I am encountering the following error during the test connection:

Thanks,
Rohit

1 Like

Hi @rohitmisal45 ,

This looks to be a permission issue with the service account that you are using to connect to the jdbc source. Please check the permissions with the concerned team and confirm the service account have necessary read permissions to the table that you are connecting to.

Thanks

jdbc:sqlserver://URL:PortNo;DatabaseName=DBNAME;encrypt=false
(Update JDBC:SQLServer name to above url as per your database type.)

Try setting the above url in your connection settings (by adding encrypt=false at the end ) and check if that works.

1 Like

@rohitmisal45 have you managed to resolve the issue?

@sk8er23 No, the issue is not resolved yet.

1 Like

Thanks @mabhavsa,
I tried the URL you given, but it won’t work.

1 Like

Hey @rohitmisal45 ,

This is a generic error .
Please ensure the provided password is right .
Check if the Database you are trying to access is allowing the external parties to act upon .
I can see you are using root user as service account , check with this command if the root has permission on ‘%’ which means ALL :

 SELECT host FROM mysql.user WHERE user = 'root';

Mysql permissions distinguish by host and ip. Permissions granted for a hostname do not work for an IP and vice versa.

if the Host Value is only localhost , execute the below commands on MYSQL to elevate the root user level to other networks as well

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'PASSWORD';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;

You should be able to see the following after executing above commands :
(In the below image replace ‘iam_user’ with ‘root’

I hope this helps!

Thanks !

Hello @sidharth_tarlapally
Thanks for sharing the solution!

The issue is not resolved yet.
I’m confident the password is correct since it works locally.
How can I verify if the database is configured to allow third-party access?
I tried using the IP address instead of the hostname. Is that correct, or should I always use the hostname?

Thanks
Rohit

1 Like

Hello @rohitmisal45 ,

Confirm with the Application Team if the root user is provided with enough privileges. You can use IP address (if hosts.yaml is not configured) .
I don’t see any problem on source configuration. Changes need to be made on MySQL - Server .

Thanks

if you are sure the credentials are correct might be worth checking connectivity through the VA, I have had issues in the past with proxies etc.

Could also be worth sharing your config here for review.

Thank you all for helping with this issue.!
The problem was caused by two service users with the same name but different hosts ('%' and 'localhost'). I resolved it by resetting the password for the specific user using this command:

sql

Copy code

ALTER USER 'service-user'@'hostname' IDENTIFIED WITH mysql_native_password BY 'password';

I hope this helps anyone facing a similar issue!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.