Reputation: 577
I'm trying to create a database with Sequelize. I keep getting this error.
Error: Dialect needs to be explicitly supplied as of v4.0.0 at new Sequelize
Here's my "new Sequelize" constructor (or whatever you call it):
var sequelize = new Sequelize("seqGenZoo_db", "root", {
host: "localhost",
dialect: "mysql",
pool: {
max: 5,
min: 0,
idle: 10000
}
});
Looks like the dialect is provided. What's the deal? I've installed the mysql and mysql2 nmp packages, if that means anything.
Upvotes: 0
Views: 92
Reputation: 22758
Error 1045 indeed means you have incorrect user/password pair. And according to the official documentation you should indicate database
, username
, password
and options
parameters:
public constructor(database: string, username: string, password: string, options: Object)
Upvotes: 1