-
Node] sequelize에서 mysql 로그인시 unknown plugin sha256_password 오류 발생NodeJS 2020. 12. 20. 03:55728x90
개발서버를 구축하고 테스트를 진행중에 아래와 같은 오류가 발생하였습니다.
node:56906) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. 2020-06-04 03:30:55.384 KST [error]: main - Server requests authentication using unknown plugin sha256_password. See TODO: add plugins doco here on how to configure or author authentication plugins.
sha256_password 플러그인 설치를 해야 하는건가? 아니면 설정을 추가해야 하는건가 많이 찾아봤는데요.
결론은 Mysql 8.0 이상에서 계정을 생성할때 비밀번호 생성을 아래와 같이 해서 발생한 문제였습니다.
create user '사용자'@'%' identified by '비밀번호';
만약 계정을 생성했다면 다음 명령어로 비밀번호를 업데이트 하면 문제가 해결 됩니다.
ALTER user '사용자'@'%' IDENTIFIED WITH mysql_native_password BY '비밀번호'; flush privileges; // 또는 use mysql; update user set authentication_string=password('비밀번호'), plugin='mysql_native_password' where user='사용자'; flush privileges;
mysql_native_password 은 기존 인증방법으로 보안 수준을 낮추지만, 이전 드라이버와 호환이 가능한 비밀번호 암호화 방식입니다.
오늘의 삽질 끝!
참고자료
728x90'NodeJS' 카테고리의 다른 글
Swagger? OAS? with NodeJS (0) 2020.12.23 Node] Sequelize에서 MSSQL 연동시 RFC 6066 오류 해결 방법 (0) 2020.12.22 Sequelize에서 날짜에 대한 타임존 처리 하기 (0) 2020.07.15 Nodejs에서 Typescript 사용해보기! (0) 2020.07.14 swagger-node에서 express-session 설정 & 사용하기 (0) 2020.07.13