sql-server - AWS RDS MS SQL 无法连接
问题描述
我正在尝试连接到我新创建的 ms sql 数据库。但是,当我尝试连接时出现错误。错误:无法连接到数据库:{ SequelizeConnectionError: 无法连接到 ....
const sequelize =new Sequelize({
dialect: 'mssql',
dialectModulePath: 'tedious',
dialectOptions: {
driver: '**SQL Server Native Client 11.0 - is this correct?**',
instanceName: '**where do i get this?**'
},
host: '**what do i put for this?'is this the end point?**',
port: '1433',
username: 'username',
password: 'password,
database: '**what do i put for this?**',
pool: {
min: 0,
max: 10,
idle: 10000
}
});
解决方案
const sequelize = await new Sequelize(database, user, password, { host: 'rds-end-point', dialect: 'mysql' });
推荐阅读
- javascript - 我可以将 Vuejs 项目转换为 Vue-Native 吗?
- python - 如何将我的 .dat 文件转换为 csv 以便稍后在数据框中显示?
- sql - 子查询返回超过 1 个值 n SQL Server
- database - 使用 JSON 对象作为值对数据库速度的性能有影响吗?
- java - Quarkus 持久化异常和 java 空指针异常
- javascript - ReactJS onClick 获取 DIV ID
- java - Spring Java Rest Handle 在反序列化时处理无效类型
- julia - SLURM sbatch 是否会自动跨节点复制用户脚本?
- reactjs - 为什么我的事件被调用这么多次?[反应 + 电子]
- javascript - Javascript 警报与单选表单按钮不匹配