Editing the config.js file with database credentials
As we can see, the sequelize
command creates many files, including a database configuration file. This file has a sample configuration for application databases.
- Open
config/config.json
and edit thedevelopment
tag with our database details, as the following highlighted code:{ "development": { "username": "root", "password": "", "database": "mvc_mysql_app", "host": "127.0.0.1", "port": "3306", "dialect": "mysql" }, "test": { "username": "root", "password": null, "database": "database_test", "host": "127.0.0.1", "dialect": "mysql" }, "production": { "username": "root", "password": null, "database": "database_production", "host": "127.0.0.1", "dialect": "mysql" } }
Tip
Note that I'm using user ...
Get Node.js 6.x Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.