【发布时间】:2021-01-17 00:32:05
【问题描述】:
我有一个关于 sequelize 和 sql server 的问题。
所以我可以使用“localhost”或我的计算机名称连接到我的数据库,但我不能连接到“(LocalDB)\MSSQLLocalDB”。这是我的连接参数。
PASSWORD: "sw",
DB: "BusinessDB",
CONFIG: {
host: '(LocalDB)\\MSSQLLocalDB',
dialect: 'mssql',
dialectOptions: {
options: {
encrypt: true,
}
},
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
},
define:{
timestamps: false,
}
}
```
And this is the error when i'm trying to connect with this config
> Failed to connect to (LocalDB)\MSSQLLocalDB:1433 - getaddrinfo ENOTFOUND (LocalDB)\MSSQLLocalDB
Someone have the solutions for that. I search on google but I doesn't find a solution.
Thanx
【问题讨论】:
标签: node.js sql-server sequelize.js