From 92de056a8eb946cf3e0828f35185ab956dfdb459 Mon Sep 17 00:00:00 2001 From: wangxiaoxian <1094175543@qq.com> Date: Tue, 3 Mar 2026 14:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/db.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/db.js b/config/db.js index 83024db..e8b0201 100644 --- a/config/db.js +++ b/config/db.js @@ -10,7 +10,7 @@ const createDatabase = async () => { user: 'root', password: '123456' }); - + // 创建数据库 await connection.query('CREATE DATABASE IF NOT EXISTS rentease'); console.log('数据库创建成功'); @@ -25,8 +25,8 @@ const createDatabase = async () => { // 创建数据库连接 - 使用MySQL const sequelize = new Sequelize( 'rentease', // 数据库名称 - 'root', // 用户名 - '123456', // 密码 + 'rentease', // 用户名 + 'Wxx@123!', // 密码 { host: 'localhost', dialect: 'mysql', @@ -61,4 +61,4 @@ const testConnection = async () => { }; // 导出sequelize实例 -module.exports = sequelize; \ No newline at end of file +module.exports = sequelize;