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

前端 未结 4 1106
一生所求
一生所求 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:26

    I found out that I was caused by incorrect parameters.

    { database: 'abc',
      username: undefined,
      password: 'efsefs',
    }
    

    username is undefined, but the error is "consider upgrading MySQL client" So modify the user name to be true, the error resolved.

提交回复
热议问题