title: How can I connect, from the terminal, to AWS mysql DB instance
body: <p>I am using Ubuntu. I deployed an app to AWS beanstalk following the instructions here: <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html" rel="nofollow">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html</a></p>
  
  <p>It's up, running and viewable. However two major issues seem to be a problem. </p>
  
  <ol>
  <li><p>During the creation and deployment, on my local terminal, when it came to the "create DB instance" bit I selected "y". After apparent successful deployment, I did "eb status" and got this for my DB instance (slightly modified below for security purposes): </p>
  
  <p>RDS Database: AWSEBRDSDatabase | aa1x1c7p9lu9xxt.cpv9i4mprkez.us-west-1.rds.amazonaws.com:3306</p></li>
  </ol>
  
  <p>First question: which bit is the user, which bit the db name and I assume the password is the one I entered during the deployment process. </p>
  
  <p>How can I connect to this from my terminal? I have tried a number of variations based on:</p>
  
  <pre><code>mysql -h aa1x1c7p9lu9xxt.cpv9i4mprkez.us-west-1.rds.amazonaws.com -u root -p aa1x1c7p9lu9uxt
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>ERROR 2003 (HY000): Can't connect to MySQL server on 'aa1x1c7p9lu9xxt.cpv9i4mprkez.us-west-1.rds.amazonaws.com' (110)
  </code></pre>
  
  <p>What is the correct way to connect from the terminal?</p>
  
  <p>The second issue is slightly more sinister. When I go to my AWS terminal the Elastic Beanstalk section says that I have no environments and no applications despite the fact that the app I deployed is up and running. Secondly, the RDS section says that I have no RDS DB instances. </p>
  
  <p>I am very puzzled to say the least. </p>
  
  <p>All help received gratefully. </p>