AWS (Elastic Beanstalk, RDS). The RDS database becomes unavailable - mysql

I deployed webAPP (Java) using Elastic Beanstalk, RDS(MySQL). HEALTH Status OK!
Access to the database is lost after 1 or 2 days. In the IDEA, when I connect to the database, I get an error [42000][1049] Unknown database 'ebdb'.
I have to rebuild environment (Elastic Beanstalk). But in a time I get that problem again. What is the reason of the error? How I can see in AWS is there database or not? Thanks.

I have never seen this issue. I have a custom Java Spring BOOT app running on Elastic Beanstlak and queries data from a RDS MySQL instance. Its been running well over a year without issue.
The database runs fine without any connection issues you are describing. When you look at the RDS instance in the AWS Management Console, what is the status of the database. Is it available - as shown here?
The URL to the RDS Management console in us-west-2:
https://us-west-2.console.aws.amazon.com/rds/home

Related

Sudden "unknown MySQL server host error" on AWS with Django

I am receiving a lot of error reports from my Django server throwing:
(2005, "Unknown MySQL server host 'my-address.us-east-1.rds.amazonaws.com' (0)").
The server has been connecting to this database for more than a year without any issue. But this morning I suddenly started to receive this error, even though I didn't do any changes to the code.
Furthermore, when I connect to my website, it actually loads data from the database fine.
Apparently there is a random chance that it won't manage to connect?
Any idea what can cause that and how to fix it?
I am on Amazon lightsail.
There is an active AWS DNS resolving incident in us-east-1 region. Seems like it will be mitigated soon.
https://status.aws.amazon.com/
UPDATE: The issue is now resolved as updated by AWS.

Laravel: No such file or directory for table in AWS RDS laravel

I currently deployed my laravel app to the AWS elastic beanstalk. I created RDS mysql database. I imported my sql dump from my local project and deployed it to the AWS EC2 server. But I'm getting this error.
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from settings where code = company-name limit 1).
Is there any way how to check if there are data in my DB ? Just to note I'm still learning moving around AWS. Thanks.
EDIT :
I'm also getting correct Environment & details like RDS_PORT RDS_HOST... , on error page where I can see the error displaying
You can follow this tutorial to connect to a MYSQL RDS Database on AWS.
So you can check if all your tables have been created successfully.
AWS Connect to Database Tutorial
Make sure that you open the port of the RDS database in the security group. Otherwise your local machine can't connect to the Database.

AWS MySQL Connection timeout

I setup a mysql DB instance with elasticbeanstalk. but Im unable to connect to the DB via mySQL commandline tool or the workbench.
troubleshooting steps so far:
ping - No response time out.
WorkBench - Timeout
Commandline - Timeout
I figured this could be a firewall issue so I changed the security groups assigned to the DB to all all traffic.
Still unable to connect. Need some advice with other troubleshooting steps or solutions for how I can connect to the DB instance.
Based on the comments, the problem was the RDS had Public IP disabled. Thus, the solution was to enable it.

Unable to connect from local machine to AWS RDS db instance

i am trying to connect AWS db instance through MySQL workbench, the current rdb instance engine is MYSQL 5.6.23 also i am under the free tier plan in AWS ap-southeast region (Singapore)
These are the follwing steps in MySQL workbench
The user name and password is already set by me when i click the Test connection i got error always like this in the below image
So i go to the RDS Security group of this instance amrita2016-rds (sg-970f10f2) in AWS and Add an inbound rule to that group for allowing connections from my machine see the image
after that i tried once again through MYSQL workbench getting same error also i am working under domain network . Please help me to resolve this issue

Xeround MySQL Cloud Database Backend Connection Refused with Heroku but connects with MySQL WorkBench 5.2

I've a WordPress Blog Website running on a Heroku Cloud Web-space (Stack - Cedar) whose back-end is at Xeround Cloud MySQL Database (10 MB free DB Plan, only 1 MB used till now). Every thing was well configured & running well from 2 days, until when today i visited the Heroku Website showed the "Internal Server Error", on Checking the Heroku logs, i found that now the Xeround Database Connection was Rejecting always. I've checked the Database Connectivity with MySQL Workbench 5.2 CE with same DB Credentials written on the WordPress Config file, it got connected & Queried well.
Now I am unable to find the way to rectify the problem. How should I find what's going wrong with the Heroku to Xeround DB Connection. (DB Space is still 8 MB+ available & Heroku logs not providing any info why Connection got rejected.)