프로그래밍/BUILD DEPLOY
[AWS RDS] RDS 연결 오류 - ERROR 2059 (HY000): Authentication plugin 'mysql_native_password' cannot be loaded
솔솔바람개발
2024. 10. 20. 22:28
반응형
RDS 생성 후, 내 mac 터미널에서 RDS mysql에 연결하려니 아래와 같은 에러가 났다.
ERROR 2059 (HY000): Authentication plugin 'mysql_native_password' cannot be loaded: dlopen(/opt/homebrew/Cellar/mysql/9.0.1_3/lib/plugin/mysql_native_password.so, 0x0002): tried: '/opt/homebrew/Cellar/mysql/9.0.1_3/lib/plugin/mysql_native_password.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/mysql/9.0.1_3/lib/plugin/mysql_native_password.so' (no such file), '/opt/homebrew/Cellar/mysql/9.0.1_3/lib/plugin/mysql_native_password.so' (no such file)
원인을 찾아봐도 어디에도 답이 안나오던 와중에, 내 local mac mysql 버전과 rds 버전이 다르다는 것이 생각았다.
- local MAC : mysql9
- RDS : mysql8
그래서 로컬에 mysql8을 재설치 하기로 함.
# 기존 설치 삭제 - 최신버전 mysql9에서 rds mysql8 이 연결이 안됨.
brew uninstall mysql
# 8.0으로 재설치
brew install mysql@8.0
# mysql로 rds 연결 -> 연결 가능한거 확인.
mysql -h 호스트명 -u admin -p
# 로컬 mysql 시작
brew services restart mysql@8.0
# mysql이 잘 설치된건지 brew 목록 확인
brew servies list
# mysql 서버 실행
mysql.server start
이후에 연결하면 잘 연결됨
반응형