0

I am trying to connect to my RDS MySQL instance using MySql client on a ubuntu terminal. When I type the following command and provide it the database password, I notice that it fails and it seems like it is trying to connect to a different hostname than the one I want it to connect to. What am I missing?

Desired DB Host: iraas.xxxxxxxxx.us-east-2.rds.amazonaws.com

Seems to be trying to connect to: pool-101-8-58-129.nwrknj.fios.verizon.net

mysql \
--host=iraas.xxxxxxxxx.us-east-2.rds.amazonaws.com \
--port=3306 \
--user=my-user -p blahblah

Enter password: 
ERROR 1045 (28000): Access denied for user 'my-user'@'pool-101-8-58-119.nwrknj.fios.verizon.net' (using password: YES)
Darth.Vader
  • 5,079
  • 7
  • 50
  • 90
  • pool-101-8-58-129.nwrknj.fios.verizon.net is the host name of the client computer, not the server. Your computer does not have access to your server. – Shadow Jan 02 '22 at 02:57
  • @Shadow - yes, that's my client computer.. but don't know why mysql client is not taking the hostname i am passing in the `-h` option.. – Darth.Vader Jan 02 '22 at 03:02
  • Then perhaps you should study the mysql manual on access control... The host name part of the user id stands for the client, not the server. – Shadow Jan 02 '22 at 03:05
  • @Shadow -- from mysql Man page, mysql "--host" says "Connect to the MySQL server on the given host." and the iraas.* is in fact my mysql host name. What am I missing? – Darth.Vader Jan 02 '22 at 19:07
  • Please read the answer to the duplicate question. – Shadow Jan 02 '22 at 20:51

0 Answers0