[英]How can access AWS RDS by CLI / PUTTY?
I am new to AWS , I can access EC2 user by putty. 我是AWS新手,我可以通过putty访问EC2用户。 Like this how can i connect AWS RDS by PUTTY ?
像这样我如何通过PUTTY连接AWS RDS?
I have AWS RDS Endpoint , If i try like the below 我有AWS RDS端点,如果我尝试如下
mysql -h testing.cx2wamr3cbzm.us-west-2.rds.amazonaws.com -P 3306 -u Username -p
I am getting some error like 我收到一些错误
ERROR 2003 (HY000): Can't connect to MySQL server on 'testing.cx2wamr3cbzm.us-west-2.rds.amazonaws.com' (110) ERROR 2003(HY000):无法连接到'testing.cx2wamr3cbzm.us-west-2.rds.amazonaws.com'上的MySQL服务器(110)
I think there is a problem with security group.I searched more, but its difficult to understand for me. 我认为安全组存在问题。我搜索的更多,但我很难理解。
I want to create database and assign rights ? 我想创建数据库并分配权限?
Thanks 谢谢
RDS is not available to the world by default. 默认情况下,全世界都无法使用RDS。 It's also generally a bad idea to allow access to the RDS from anywhere except from inside your VPC.
除了从VPC内部以外的任何地方允许访问RDS通常也是一个坏主意。 I recommend you do the following:
我建议你做以下事情:
Create a security group that allows access to the RDS over port 3306 from your EC2 instance 创建一个安全组,允许从EC2实例通过端口3306访问RDS
Assign the security group to your RDS 将安全组分配给RDS
SSH into your EC2 instance then run the mysql command in your question SSH进入您的EC2实例然后在您的问题中运行mysql命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.