AWS

[AWS] Access denied for user 'id'@'ip' (using password: YES)" 해결 방법

폭풍저그김탁구 2022. 4. 17. 21:37

좀 더 자세한 에러 로그는

Access denied for user '[user]'@'ec2-...-...-.[region].compute.amazonaws.com' (using password: YES)"

였다.

AWS에서 RDS를 이용하고 있었고 암호를 이용해 인증하고 있었다.

최근에 비밀번호를 바꾼 후로 나던 오류라 관련되어서 뭔가 문제가 있겠거니 했는데, 그 문제가 뭔질 모른다는 게 더 문제였다...^...;

workbench는 잘 연결 되는데 server 상으로 연결이 안 됐다.

select host, user from mysql.user;

이런 sql 문을 이용해도 host는 '%'로 잘 나왔고...

 

해결 방법은 다시 비밀번호를 바꾼 거였다.

 

https://stackoverflow.com/questions/63010591/access-denied-for-user-adminmy-ip-using-password-yes-when-connecting-to

 

Access denied for user 'admin'@'MY-IP' (using password: YES) when connecting to MySql RDS in AWS

I am able to connect through the below command and see the databases. But unable to run migration or create tables which results in below error. Command mysql -h endpoint.rds.amazonaws.com -u admin...

stackoverflow.com

이 글을 보고 댓글로 비밀번호에 #가 들어가면 이런 오류가 뜬다는 거였다. 나는 #가 포함되지 않은 비밀번호를 가지고 있었지만 이 댓글을 보고 혹시 나도 이런 마음에 바꿨더니 너무 잘 돌아간다.

 

내가 스트레스로 죽으면 AWS 때문이라고 하고 싶어지는 하루였다.