数据库
This commit is contained in:
parent
92de056a8e
commit
63cab98758
|
|
@ -7,8 +7,8 @@ const createDatabase = async () => {
|
||||||
// 连接到MySQL服务器
|
// 连接到MySQL服务器
|
||||||
const connection = await mysql.createConnection({
|
const connection = await mysql.createConnection({
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
user: 'root',
|
user: 'rentease',
|
||||||
password: '123456'
|
password: 'Wxx@123!'
|
||||||
});
|
});
|
||||||
|
|
||||||
// 创建数据库
|
// 创建数据库
|
||||||
|
|
@ -42,8 +42,8 @@ const testConnection = async () => {
|
||||||
// 重新创建sequelize实例,确保连接管理器是活跃的
|
// 重新创建sequelize实例,确保连接管理器是活跃的
|
||||||
const newSequelize = new Sequelize(
|
const newSequelize = new Sequelize(
|
||||||
'rentease', // 数据库名称
|
'rentease', // 数据库名称
|
||||||
'root', // 用户名
|
'rentease', // 用户名
|
||||||
'123456', // 密码
|
'Wxx@123!', // 密码
|
||||||
{
|
{
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
dialect: 'mysql',
|
dialect: 'mysql',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue