-1

I have used RDS for many years, and MySQL for even longer, so I am very familiar with both -- yet, I am running into an odd thing that I cannot figure out. Wondering if someone can help.

I have 2 databases (production, staging) on RDS. They are separate DB instances. I have applications running on EC2 instances that access the respective DBs. They are working fine and never have lost a DB connection, etc.

I normally make schema updates and do specialized queries by connecting from one of my application EC2 hosts (which has connectivity rights to RDS of course), via command line MySQL. This works fine for many days. Then, suddenly, one day, while trying to access my production DB, I get:

ERROR 1045 (28000): Access denied for user ...

I try connecting from another one of my app hosts. No dice. I try connecting on one of my staging EC2 hosts to the staging RDS instance. Same result! Crazy! Two different RDS instances. Multiple EC2 hosts, all with network access to the RDS instance.

Has anyone else ever run into this? I have tried rebooting the RDS instance, but to no avail. And then I run a simple Java program on the EC2 host that connects to the DB via JDBC, and it works fine!

I'm baffled. Almost like something is wrong with the mysql client.

Any help would be appreciated.

  • 1
    This question has nothing to do with programming, therefore it is off topic here on SO. The DBA sister site of SO offers help in troubleshooting database operations type of questions. – Shadow Apr 18 at 23:59
  • Some config may have changed. Inspect CloudTrial to check if someone, or some role, was used to do some changes in your setup. – Marcin Apr 19 at 0:09
  • 1
    @shadow: ... and yet you answered this question: stackoverflow.com/questions/40585021/… (sorry to catch you on a bad day, buddy) – CharlieBucket Apr 19 at 0:10
  • @Marcin: thank you – CharlieBucket Apr 19 at 0:11
  • @CharlieBucket sorry to rebut you pal - that the question was performance related. Trying to deflect that your question is obviously off topic by trying to ( and failing) point out that there are other off topic questions on SO is not a particularly great defence! – Shadow Apr 19 at 0:38
-1

The root cause was the MacOS terminal emulator which, for whatever reason, can get into a bad state. Despite reconnecting many times to my EC2 instance through MacOS terminal, the terminal emulation mode must have remained the same. I even tried other windows/tabs of Terminal. Very non-intuitive.

I was able to verify all of this by downloading iTerm and trying the whole sequence again. If you run into a similar scenario, try a different terminal emulator!

ps: no thanks to the question police

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.