数据库
This commit is contained in:
parent
92de056a8e
commit
63cab98758
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue