简体   繁体   中英

Amazon AWS RDS sql server connection string

I have created a Amazon AWS RDS sql server database.

  1. I have connected the server by sql management studio. From my computer AWS server is connecting successfully as well as from other computer in same network serve. But the PC from other location and different network AWS RDS server is not connecting.

  2. I have created ac# windows application. From my pc it has successfully connected to AWS server and its working perfectly. My connection string is

    Data Source=****.us-east-2.rds.amazonaws.com;Network Library = DBMSSOCN; Initial Catalog=myDB; User ID = username; Password = pass;

    I have installed the setup file to client PC. But from the client PC, it is not connecting to AWS server and show bellow error
    "A network related or instance specified error occurred while establishing a connection to sql server.... "

Any suggestion?

This can happen due to multiple reasons. Two of the most common issues are.

  • AWS Security Group attached to the RDS instance not having Client IP whitelisted.
  • Firewall issue in Clients network firewalls.

Note: To troubleshoot these kind of issues, it will be usefull to setup VPC flow logs.

It's almost certainly a firewall issue.

First of all, check inbound rules of your server's security group and make sure incoming connections are allowed from client's IP address (not just from your IP address).

Secondly, many companies restrict outgoing connections to http and https only. In which case, I'm afraid you can't do much about it - your client will have to change firewall rules to allow connecting to the database.

我遇到了它,我不得不手动编辑数据库入站规则(在安全组上)以接受来自任何地方的连接。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM