官术网_书友最值得收藏!

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.

  1. Open config/config.json and edit the development 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 root with no password to connect with my database, if you have a different user or are using a different password, replace the previous code with your own credentials.

主站蜘蛛池模板: 印江| 池州市| 如东县| 女性| 沁源县| 沙河市| 钟山县| 三亚市| 项城市| 新郑市| 龙江县| 中宁县| 淮南市| 普宁市| 珠海市| 十堰市| 彩票| 凌云县| 新野县| 大庆市| 亚东县| 阜新| 芦山县| 宝应县| 米泉市| 寿阳县| 崇仁县| 紫阳县| 阳曲县| 肥西县| 新干县| 石台县| 乌兰浩特市| 寿光市| 青阳县| 安仁县| 平舆县| 隆回县| 黔江区| 旌德县| 长阳|