错误 2005 (HY000):aws 中的未知 MySQL 服务器主机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25659051/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ERROR 2005 (HY000): Unknown MySQL server host in aws
提问by Riyas TK
I have created an e-commerce site in angular js. And I need to host the same in amazon web service.
我用 angular js 创建了一个电子商务网站。我需要在亚马逊网络服务中托管相同的内容。
So inorder to host the same I created an ec2 instance first. Now after that added an rds instance with a security group of VPC by allowing all ip's as outbound and inbound. While creating security group I specified for mysql and for all connection. Still after I remotely loged into the instance and try to connect to the end point from rds instance using
因此,为了托管相同的内容,我首先创建了一个 ec2 实例。现在,通过允许所有 ip 作为出站和入站,添加了一个带有 VPC 安全组的 rds 实例。在创建安全组时,我为 mysql 和所有连接指定了安全组。仍然在我远程登录到实例并尝试使用 rds 实例连接到端点之后
mysql -u username -p password -h ********.ap-southeast-1.rds.amazonaws.com:3306
I get an error
我收到一个错误
ERROR 2005 (HY000): Unknown MySQL server host xxxxxxxxx (0)
I created the instance from Asia Pacific (singapore) region since I am a resident of india.
由于我是印度居民,因此我从亚太地区(新加坡)地区创建了该实例。
回答by slayedbylucifer
It should be ********.ap-southeast-1.rds.amazonaws.com
instead of ********.ap-southeast-1.rds.amazonaws.com:3306
它应该********.ap-southeast-1.rds.amazonaws.com
代替********.ap-southeast-1.rds.amazonaws.com:3306
You do not need the port number in the end.
您最终不需要端口号。