NodeJS/mySQL - ER_ACCESS_DENIED_ERROR Access denied for user 'root'@'localhost' (using password: YES)

前端 未结 29 4325
北恋
北恋 2020-12-13 13:26

I am attempting to connect to mySQL through a NodeJS file, but I receive the following error:

{ Error: ER_ACCESS_DENIED_ERROR: Access denied for user \'root\         


        
29条回答
  •  遥遥无期
    2020-12-13 13:48

    Try n make sure that you use the credentials that you use to login your database are correct

    const Sequelize = require('sequelize')
    const db = {}
    const sequelize = new Sequelize('ochiengsDatabase', 'ochienguser', ' 
    mydbpassword', {
    host: 'localhost',
    dialect: 'mysql',
    operatorsAliases: false,
    

提交回复
热议问题