1

I am using Ubuntu. I deployed an app to AWS beanstalk following the instructions here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html

It's up, running and viewable. However two major issues seem to be a problem.

  1. 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):

    RDS Database: AWSEBRDSDatabase | aa1x1c7p9lu9xxt.cpv9i4mprkez.us-west-1.rds.amazonaws.com:3306

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.

How can I connect to this from my terminal? I have tried a number of variations based on:

mysql -h aa1x1c7p9lu9xxt.cpv9i4mprkez.us-west-1.rds.amazonaws.com -u root -p aa1x1c7p9lu9uxt

I get the following error:

ERROR 2003 (HY000): Can't connect to MySQL server on 'aa1x1c7p9lu9xxt.cpv9i4mprkez.us-west-1.rds.amazonaws.com' (110)

What is the correct way to connect from the terminal?

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.

I am very puzzled to say the least.

All help received gratefully.

Anthony Neace
  • 25,013
  • 7
  • 114
  • 129
user1903663
  • 1,713
  • 2
  • 22
  • 44
  • Refer to: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html – SreekanthGS Apr 25 '14 at 10:03
  • Also, there is a firewall which is preventing this. See: http://stackoverflow.com/questions/8344057/connect-to-mysql-on-aws-from-local-machine – SreekanthGS Apr 25 '14 at 10:06
  • tried as per link above, same result. What should I put as user? root? Also, is it relevant that the instance does not appear on my aws console? – user1903663 Apr 25 '14 at 10:12
  • It is relevant. Can you login to AWS console, create a DB from there and try accessing? – SreekanthGS Apr 25 '14 at 10:14
  • I would prefer to use the one I created during deployment. I don't understand why it does not appear on my RDS console – user1903663 Apr 25 '14 at 10:19
  • thanks, it works now with the RDS I created on the AWS console, but still a mystery why the one I created during the terminal deployment a) did not appear on my console and b) was inaccessible. – user1903663 Apr 25 '14 at 11:20

2 Answers2

1

As to the first part of your question, MySQL is unable to connect to the host at all (not even trying to authenticate), which means that you either got the hostname wrong or more probably haven't allowed remote access to the MySQL.

See this answer for more information on what you need to do.

As to the second part, documentation indicates that you should follow eb init with an eb update to update your environment. Hope that helps.

Community
  • 1
  • 1
Laas
  • 5,978
  • 33
  • 52
0

Open the VPC SG (under Writer DB -> Security ->VPC) and edit Inbound rule of SG the with your local machine IP/Port. (All TCP) enter image description here

erptocoding
  • 305
  • 3
  • 5