NodeJS MySQL Client does not support authentication protocol

前端 未结 2 844
心在旅途
心在旅途 2021-02-02 15:52

When I am trying to connect with mysql 8.0 I am getting this error. How can I fix this ?

code: \'ER_NOT_SUPPORTED_AUTH_MODE\',
errno: 1251,
sqlMessage: \'Client         


        
相关标签:
2条回答
  • 2021-02-02 16:19

    Try change the password as below:

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'your new password'; 
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your new password';
    
    0 讨论(0)
  • 2021-02-02 16:28
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; 
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
    
    FLUSH PRIVILEGES;
    

    "password" is that you have to change the password you already have or you will modify it for a new one

    0 讨论(0)
提交回复
热议问题