无法从 Ubuntu SQL Server Express 连接到 Amazon AWS SQL Server Express 数据库

Cannot Connect to Amazon AWS SQL Server Express database from Ubuntu SQL Server Express

我在 SQL 服务器中创建了一个 Amazon RDS 数据库,创建了一个具有入站规则类型 SQL 服务器协议 TCP 端口 "XXXX" 源 "My PC's IP Address/32" 的自定义安全组,允许通过“sudo ufw allow from any to any port "XXXX" proto tcp”通过我的防火墙端口 "XXXX",通过本教程在 ubuntu 上成功安装了 SQL 服务器:https://computingforgeeks.com/how-to-install-ms-sql-on-ubuntu/,并在我的 AWS 数据库中将 'public-accessibility' 设置为 'no'。

但是,当我尝试通过以下命令行从命令行登录我的 AWS 数据库时:

sqlcmd -S databasename.code.us-east-#.rds.amazonaws.com,XXXX -U username -P password -d DatabaseName

我收到错误:

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x102.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

我拼写正确。我做错了什么?

能否请您检查您的 VPC 的网络 ACL,并确保您的 VPC ACL 允许临时端口。 https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html#nacl-ephemeral-ports