MySQL: Access denied using 127.0.0.1 but OK using localhost.
Hello,
I've recently replaced an older server and after migrating all the accounts I'm having many customers not being able to connect to MySQL using the address '127.0.0.1' but they're being able to connect using 'localhost'. I know I could just allow '%' or even '127.0.0.1' but I would like to find the solution because I'm getting more and more tickets about this and I find it very annoying as localhost and 127.0.0.1 are the same thing.
I'm using:
Server version: 10.3.23-MariaDB-cll-lve MariaDB Server
Thank you
-
This mariadb article goes over this: Configuring MariaDB for Remote Client Access 0 -
The connection I believe is in the bind-address configuration which they discuss there right at the beginning of the article. It does not require grants but is a known issue users experience with MariaDB when attempting to connect over TCP whether using 127.0.0.1 or a different IP. MySQL tries to connect using a socket when you use localhost, but it uses TCP when you connect to 127.0.0.1, and the permissions can even be set differently for localhost and 127.0.0.1, which is why I linked you that specific article. A quick google search also shows you a number of others with the same questions: 0
Please sign in to leave a comment.
Comments
3 comments