Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-326

hostnames should not be resolved to ip addresses

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 1.4.5
    • N/A
    • Other
    • 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.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            tmccann Tom McCann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.