Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
1.4.5
-
None
-
rhel6 java7
Description
Using this connection: jdbc:mysql://localhost/schema
I get connection refused. admin@localhost has access to the database I'm trying to connect to, but connector is trying to connect 127.0.0.1. Here's the output: ERROR: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost/schema) for user 'admin': Could not connect: Access denied for user 'admin'@'127.0.0.1' to database 'schema'.
This akin to trying to connect to an https web site using the ip address. I.e. your browser will warn you about a certificate mismatch if you try to connect to google.com via it's ip address: https://216.58.193.78
As a work-around I added a admin@127.0.0.1 mysql user, but it would be better if the connector followed the rules.