DB error trying to start rancher/server

Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not connect: Access denied for user ‘usenamer’@‘XXX.XXX.XXX.XXX’ (using password: YES)
Not sure if it is because it is not reaching the RDS instance, or because it is adding the @‘XXX.XXX.XXX.XXX’ where the xxx stuff is the ip of my host, and it should just be using the username without that @ stuff.

Access denied for user 'username'@'IP' (using password: YES) is a message that comes from the MySQL server, so that part is normal. It means it is making a connection to the database but not accepting the username, source IP, and password combination that was requested.

So either the username or password is wrong, or that username/password is not allowed to connect from the x.x.x.x IP.

I have verified that I can connect with the username and password from all the hosts, as long as the @IP is not appended to the username.

And, these are AWS EC2 instances that I don’t know the IP of before hand, so adding grants for the username@IP doesn’t seem right in an automated deploy.

@x.x.x.x’ is not actually part of the username; I’m not suggesting you have or should use credentials that are allowed only for a particular source IP. Just that it is part of the standard message returned by MySQL when the connection to the server is established but credentials are rejected.

Assuming you’re hitting the right database server, the username, password, and source IP of the request are the three pieces of info that might cause that and it just shows you them. It doesn’t tell you which one(s) it doesn’t like.

ok, I added grants for ‘username’@’%’ for testing. Still not connecting. Will keep at it.

pinging an old thread… I have the same issue as btidd. What was the resolution??

OK

I found the answer. MySQL does a reverse DNS lookup by default… and so when it’s an instance IP, it won’t resolve.

I fixed by setting the param “skip_name_resolve” to 1 in the RDS Parameter Group

this should fix anyone up with the same problem.