본문 바로가기
WEB/기초

[WEB] Express DB연결시 'Client does not support authentication protocol' 에러 해결 방법

by IT황구 2021. 5. 14.
728x90
반응형

순서가 뒤죽박죽이라서 미안합니다..

하루빨리 해야하는 상황이라 DB연결부터 어떻게든 일단 해야해서..

이렇게 올바르게 썼음에도 불구하고 DB의 연결이 안되는 경우가 있습니다.

이건 Mysql 8.0 version에서 나는 버그라고 합니다.

저는

이렇게 써서 해결을 하였고,

ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY '내 비번';

flush privileges;

출처는

https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server

 

MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

I can't make a simple connection to the server for some reason. I install the newest MySQL Community 8.0 database along with Node.JS with default settings. This is my node.js code var mysql =

stackoverflow.com

 

여기서 찾았습니다.

읽기 귀찮으신 분들을 위해서 요약

Mysql에서 사용하는 사용자 인증 방법중 하나인 'caching_sha2_password'가 Node.js version에서는 구현되지 않았기 때문입니다.

DB의 값을 불러올 수 있게 되었습니다.

==END

 

728x90
반응형