3-Round-Stones / callimachus

Callimachus is a highly scalable platform for creating and running data-driven websites
Other
95 stars 24 forks source link

Localhost credential authority is sent as 127.0.0.1 #242

Closed edwardsph closed 8 years ago

edwardsph commented 8 years ago

A credential set up with the authority localhost:3306 is failing to connect to the database with the message: Could not connect: Access denied for user 'xxxxxx'@'127.0.0.1' (using password: YES) The database does not have a user account for 'xxxxxx'@'127.0.0.1' only for 'xxxxxx'@'localhost'.

The workaround is to add the additional user to the database but why is localhost being replaced with 127.0.0.1 when the database does not appear to treat them as the same thing.

catch-point commented 8 years ago

Callimachus' SQL Datasource uses the host in the jdbc URL to lookup the username and password from the credentials. This 127.0.0.1 string, I believe, comes from either the driver's interpretation of the jdbc URL or the network socket interface (and the system's name resolution). Either way, there is nothing Callimachus can do about it.

prototypo commented 8 years ago

We will work around this by granting database user permissions on 127.0.0.1 as well as localhost.

Regards, Dave --  David Wood http://about.me/david_wood 

On December 10, 2015 at 11:28:43, James Leigh (notifications@github.com) wrote:

Callimachus' SQL Datasource uses the host in the jdbc URL to lookup the username and password from the credentials. This 127.0.0.1 string, I believe, comes from either the driver's interpretation of the jdbc URL or the network socket interface (and the system's name resolution). Either way, there is nothing Callimachus can do about it.

— Reply to this email directly or view it on GitHub.

edwardsph commented 8 years ago

That's fine if we can't do anything about. Thanks Pete

On 10 December 2015 at 16:46, David Wood notifications@github.com wrote:

We will work around this by granting database user permissions on 127.0.0.1 as well as localhost.

Regards,

Dave

David Wood http://about.me/david_wood

On December 10, 2015 at 11:28:43, James Leigh (notifications@github.com) wrote:

Callimachus' SQL Datasource uses the host in the jdbc URL to lookup the username and password from the credentials. This 127.0.0.1 string, I believe, comes from either the driver's interpretation of the jdbc URL or the network socket interface (and the system's name resolution). Either way, there is nothing Callimachus can do about it.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/3-Round-Stones/callimachus/issues/242#issuecomment-163683782 .