sequelize dialect mysql code example

Example 1: new Sequelize('featherstutorial', 'databaseUser', 'databasePassword'

var sequelize = new Sequelize('database', 'username', 'password', {
  host: "my.server.tld",
  port: 12345
})

Example 2: sequelize dialect and dialect options

const sequelize = new Sequelize('database', 'username', 'password', {
  dialect: 'mysql',
  dialectOptions: {
    // Your mysql2 options here
  }
})

Example 3: new Sequelize('featherstutorial', 'databaseUser', 'databasePassword'

var sequelize = new Sequelize('database', 'username'[, 'password'])

Tags:

Misc Example