数据库

This commit is contained in:
wangxiaoxian 2026-03-03 14:24:33 +08:00
parent 92de056a8e
commit 63cab98758
1 changed files with 4 additions and 4 deletions

View File

@ -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',