首页 > 解决方案 > 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
      }
  });

标签: sql-servernode.jsamazon-web-servicessequelize.jsamazon-rds

解决方案


const sequelize = await new Sequelize(database, user, password, { host: 'rds-end-point', dialect: 'mysql' });

推荐阅读