diff --git a/config/db.js b/config/db.js index e8b0201..cc20c7a 100644 --- a/config/db.js +++ b/config/db.js @@ -7,8 +7,8 @@ const createDatabase = async () => { // 连接到MySQL服务器 const connection = await mysql.createConnection({ host: 'localhost', - user: 'root', - password: '123456' + user: 'rentease', + password: 'Wxx@123!' }); // 创建数据库 @@ -42,8 +42,8 @@ const testConnection = async () => { // 重新创建sequelize实例,确保连接管理器是活跃的 const newSequelize = new Sequelize( 'rentease', // 数据库名称 - 'root', // 用户名 - '123456', // 密码 + 'rentease', // 用户名 + 'Wxx@123!', // 密码 { host: 'localhost', dialect: 'mysql',