스마일게이트 인턴 - Dev Camp
MySQL 8.0 - Authentification Error
로그뉴
2020. 12. 15. 17:13
Node.js 와 MySQL 연동 시 오류
Client does not support authentication protocol requested by server; consider upgrading MySQL client
이런 오류가 떴다.
찾아보니 MySQL 8.0 부터 외부접속 시 로컬 비밀번호가 아니라 암호화된 다른 비밀번호를 사용하도록 바뀌었다.
그래서 나는 msi server reconfigure에서 auth를 legacy로 바꿔준 뒤,
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
FLUSH PRIVILEGES;
ALTER USER 'devcamp'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
FLUSH PRIVILEGES;
이 명령을 쳐줌으로 해결했다.
만약 MySQL 8.0의 Authentication_plugin에 대해 더 알아보고 싶은 사람이 있다면 하단의 블로그를 참조하면 좋을 것 같다.
minsql.com/mysql8/C-2-A-authentificationPlugin/
MySQL 8.0 - Authentication_plugin 의 변경
개요
minsql.com