vipin k.
vipin k.

Reputation: 2715

RDS Mysql ERROR 1045 (28000): Access denied for user @IP (using password: YES)

[This is not a duplicate question]

I have created a RDS MySQL instance with same Security Policy and under same VPC as my EC2 instance.

However when i am trying to access the Instance from EC2 machine i am getting error: ERROR 1045 (28000): Access denied for user 'User'@'IP' (using password: YES)

Not sure if i am missing Anything.

In MYSQL setup we can resolve this error with added Privileges for User on the IP.Not sure how can we resolve this since i am unable to access the Instance itself.

Anyone faced this issue before?.

I have followed the Document: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.NonRDSRepl.html#MySQL.Procedural.Importing.Create.RDS.Database

Upvotes: 15

Views: 35793

Answers (4)

pmagunia
pmagunia

Reputation: 1788

All my security groups were configured correctly, but I had to issue the mysql command as a superuser, like this to connect from the CLI

sudo mysql -uMYADMIN -hMYHOST MYDATABASE -p

Once I added the sudo it worked.

Upvotes: 0

MonoThreaded
MonoThreaded

Reputation: 12033

The goofy ones always get you: I experienced the same problem after changing the master password but let slip the important fact that by default changes don't take effect until the next maintenance window.

In my scenario I was connecting to an Aurora MYSQL serverless v2

  • Check you are connecting to the cluster writer instance endpoint
  • Modify the master password and apply changes immediately

Upvotes: 0

jairud
jairud

Reputation: 51

Maybe late but I had the same problem today.

  1. Confirm the MasterUsername, with the AWS CLI running aws rds describe-db-instances or in the web console, showing the cluster details on the configuration tab.
  2. Confirm the password, if you are using linux consoles (bash) some some characters may be problematic like # or !.
  3. If you are using ssl connection you can't use --ssl-mode=DISABLED. You have to use --ssl-mode=VERIFY_CA (if you are connecting to endpoint) or --ssl-mode=VERIFY_IDENTITY (OR VERIFY_CA) if are connecting to server endpoint.

Upvotes: 3

Andrey Kovalev
Andrey Kovalev

Reputation: 81

mysql -h dandy-dbamazonaws.com[...] -u root -p 

-h - put your endpoint
-u - username you set for your local mysql (root in my case). Don't confuse it with instance name
-p - after you hit 'enter' enter the password for your instance (the one you set up during instance creation)

hope it will work! that's how I resolved this issue

Upvotes: 7

Related Questions