Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2013
    Posts
    2

    Red face Unanswered: Amazon RDS - Can't connect to MySQL database server?

    Hello,

    So I've been working on this issue for a while now, and I'll explain what I'm trying to do. I'm trying to connect to a MySQL database server, hosted by Amazon Web Services in the Amazon RDS service. The database is up and running, and I've created a security group, as well as an EC2 security group. Within the Ec2 security group, I've opened up port 3306 (the MySQL port), and added it as a rule. I've then applied this rule. I've then connected the security group to the EC2 security group, and I connected the database to the security group. Thus the database should have port 3306 open (and for all I know it does!).

    So here's the issue. I'm trying to connect to the MySQL server based on the IP of the database I'm given by Amazon Web Services. However, when I attempt to connect via the Terminal command shell, the connection times out, saying that the MySQL connection failed.

    Here's what I type in: "mysql -h ***********.rds.amazonaws.com" where the asterisks are part of the IP address.


    The error is as follows: "ERROR 2003 (HY000): Can't connect to MySQL server on '***********.rds.amazonaws.com' (60)"

    I've also tried specifying a username and password to the command, but the same error occurs.

    Any thoughts as to why the connection is failing?

    Thanks, any help appreciated!

    Jake

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    One way to see if the port is enabled is to use "telnet <hostname> 3306". This will attempt a connection. If you appear to get some data transferred back and the telnet session appears to hang then the connection is open. If not then this suggests a firewall type issue.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •