错误2005 (HY000): aws中未知的MySQL服务器主机。

时间:2022-09-19 21:29:57

I have created an e-commerce site in angular js. And I need to host the same in amazon web service.

我创建了一个电子商务网站角js。我需要在amazon web service中托管相同的内容。

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.

我是来自亚太(新加坡)地区的一个实例,因为我是印度的居民。

1 个解决方案

#1


44  

It should be ********.ap-southeast-1.rds.amazonaws.com instead of ********.ap-southeast-1.rds.amazonaws.com:3306

它应该是********.ap-southeast-1.rds.amazonaws.com,而不是********。

You do not need the port number in the end.

最后不需要端口号。

#1


44  

It should be ********.ap-southeast-1.rds.amazonaws.com instead of ********.ap-southeast-1.rds.amazonaws.com:3306

它应该是********.ap-southeast-1.rds.amazonaws.com,而不是********。

You do not need the port number in the end.

最后不需要端口号。