Learn more in the [API Reference for the Sequelize constructor](../class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor). If you're connecting to the database from multiple processes, you'll have to create one instance per process, but each instance should have a maximum connection pool size of such that the total maximum size is respected. For example, if you want a max connection pool size of 90 and you have three processes, the Sequelize instance of each process should have a max connection pool size of 30.
### Note: setting up logging
Using `options.logging` can be used to define the function that gets executed every time Sequelize would log something. The default value is `console.log` and when using that only the first log parameter of log function call is displayed. For example, for query logging the first parameter is the raw query and the second (hidden by default) is the Sequelize object.
Common useful values for `options.logging`:
```js
constsequelize=newSequelize(/* ... */,{
// Choose one of the logging options
logging:console.log,// Default, displays the first parameter of the log function call
logging:(...msg)=>console.log(msg),// Displays all log function call parameters
logging:false,// Disables logging
logging:msg=>logger.debug(msg),// Use custom logger (e.g. Winston or Bunyan), displays the first parameter
logging:logger.debug.bind(logger)// Alternative way to use custom logger, displays all messages
});
```
### Testing the connection
You can use the `.authenticate()` function to test if the connection is OK: