Node JS and mysql not connecting (client does not support authentication protocol requested by server consider upgrading mysql client)

后端 未结 4 1369
再見小時候
再見小時候 2021-01-19 08:09

I\'m trying to connect my NodeJs application with a mysql database but its not connecting for some reason.

I did install the mysql npm like this (typed this in comma

4条回答
  •  庸人自扰
    2021-01-19 08:44

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourRootPassword';
    -- or
    CREATE USER 'foo'@'%' IDENTIFIED WITH mysql_native_password BY 'bar';
    -- then
    FLUSH PRIVILEGES;
    

提交回复
热议问题