Node.js & MySQL - Error: 1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

前端 未结 4 1103
一生所求
一生所求 2021-02-14 05:51

Right now I have only this code:

const Sequelize = require(\'sequelize\');
const sequelize = new Sequelize(\'database\', \'root\', \'passwd\', {
  host: \'localh         


        
4条回答
  •  失恋的感觉
    2021-02-14 06:15

    Changing the plugin to mysql_native_password might solve the problem!

    use mysql;
    update user set authentication_string=password(''), plugin='mysql_native_password' where user='root';
    

提交回复
热议问题