how to connect web application deployed on elastic benstalk with mysql database instance on aws?How do I connect to a MySQL Database in Python?How to get a list of user accounts using the command line in MySQL?How to reset AUTO_INCREMENT in MySQL?How to get the sizes of the tables of a MySQL database?How do I import an SQL file using the command line in MySQL?Elastic Beanstalk Hibernate MySQLElastic Beanstalk app won't connect to RDS MySQL instancePermissions for EC2 created by Elastic Beanstalk connecting to external RDSElastic Beanstalk Application Can't Connect to Database but Server Can502 Bad Gateway when deploying Spring Boot application to Elastic Beanstalk
What is this geomorphological feature?
What is this green alien supposed to be on the American covers of the "Hitchhiker's Guide to the Galaxy"?
Difference between c++14 and c++17 using: `*p++ = *p`
When designing an adventure, how can I ensure a continuous player experience in a setting that's likely to favor TPKs?
How to remove the first colon ':' from a timestamp?
Which GPUs to get for Mathematical Optimization (if any)?
Should I use a resistor between the gate driver and MOSFET (gate pin)?
Is this Android phone Android 9.0 or Android 6.0?
I want to identify a part from a photo
How to find location on Cambridge-Mildenhall railway that still has tracks/rails?
Alphanumeric Line and Curve Counting
May I use a railway velocipede on used British railways?
An entire function all whose forward orbits are bounded
Why won't some unicode characters print to my terminal?
What would be the safest way to drop thousands of small, hard objects from a typical, high wing, GA airplane?
numbering overwrites equation
Why is Google approaching my VPS machine?
Why is the Intel 8086 CPU called a 16-bit CPU?
Why a binary file is not shown as 0 and 1?
Why did Fury respond that way?
How is Buchholz score calculated in a Swiss tournament?
Grouping into more groups in one iteration
"Je suis petite, moi?", purpose of the "moi"?
How did Jayne know when to shoot?
how to connect web application deployed on elastic benstalk with mysql database instance on aws?
How do I connect to a MySQL Database in Python?How to get a list of user accounts using the command line in MySQL?How to reset AUTO_INCREMENT in MySQL?How to get the sizes of the tables of a MySQL database?How do I import an SQL file using the command line in MySQL?Elastic Beanstalk Hibernate MySQLElastic Beanstalk app won't connect to RDS MySQL instancePermissions for EC2 created by Elastic Beanstalk connecting to external RDSElastic Beanstalk Application Can't Connect to Database but Server Can502 Bad Gateway when deploying Spring Boot application to Elastic Beanstalk
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a web application deployed on elastic beanstalk. I have configured MySQL database for it. In database instance in security group i have done following changes: Type(MYSQL/Aurora), protocol(TCP), port range(3306) and source(0.0.0.0/0).
when i am trying to insert data into database using web application or fetch data from database using web application which is deployed on elastic beanstalk, i am not able to do it.
I have made changes in servlet code as mentioned on aws website but connection is not establishing between web application and RDS on aws.
I don't know where i am doing the mistake. please help me to achieve it.
java mysql servlets amazon-rds amazon-elastic-beanstalk
add a comment |
I have a web application deployed on elastic beanstalk. I have configured MySQL database for it. In database instance in security group i have done following changes: Type(MYSQL/Aurora), protocol(TCP), port range(3306) and source(0.0.0.0/0).
when i am trying to insert data into database using web application or fetch data from database using web application which is deployed on elastic beanstalk, i am not able to do it.
I have made changes in servlet code as mentioned on aws website but connection is not establishing between web application and RDS on aws.
I don't know where i am doing the mistake. please help me to achieve it.
java mysql servlets amazon-rds amazon-elastic-beanstalk
what is the issue you facing ? Any logs ?
– Mebin Joe
Mar 26 at 9:22
when web application is deployed on elastic beanstalk it is not connecting to aws RDS instance. But when it is running on localhost then it is connecting to aws RDS instance.
– Nishant Kumar
Mar 26 at 9:45
add a comment |
I have a web application deployed on elastic beanstalk. I have configured MySQL database for it. In database instance in security group i have done following changes: Type(MYSQL/Aurora), protocol(TCP), port range(3306) and source(0.0.0.0/0).
when i am trying to insert data into database using web application or fetch data from database using web application which is deployed on elastic beanstalk, i am not able to do it.
I have made changes in servlet code as mentioned on aws website but connection is not establishing between web application and RDS on aws.
I don't know where i am doing the mistake. please help me to achieve it.
java mysql servlets amazon-rds amazon-elastic-beanstalk
I have a web application deployed on elastic beanstalk. I have configured MySQL database for it. In database instance in security group i have done following changes: Type(MYSQL/Aurora), protocol(TCP), port range(3306) and source(0.0.0.0/0).
when i am trying to insert data into database using web application or fetch data from database using web application which is deployed on elastic beanstalk, i am not able to do it.
I have made changes in servlet code as mentioned on aws website but connection is not establishing between web application and RDS on aws.
I don't know where i am doing the mistake. please help me to achieve it.
java mysql servlets amazon-rds amazon-elastic-beanstalk
java mysql servlets amazon-rds amazon-elastic-beanstalk
asked Mar 26 at 9:21
Nishant KumarNishant Kumar
113 bronze badges
113 bronze badges
what is the issue you facing ? Any logs ?
– Mebin Joe
Mar 26 at 9:22
when web application is deployed on elastic beanstalk it is not connecting to aws RDS instance. But when it is running on localhost then it is connecting to aws RDS instance.
– Nishant Kumar
Mar 26 at 9:45
add a comment |
what is the issue you facing ? Any logs ?
– Mebin Joe
Mar 26 at 9:22
when web application is deployed on elastic beanstalk it is not connecting to aws RDS instance. But when it is running on localhost then it is connecting to aws RDS instance.
– Nishant Kumar
Mar 26 at 9:45
what is the issue you facing ? Any logs ?
– Mebin Joe
Mar 26 at 9:22
what is the issue you facing ? Any logs ?
– Mebin Joe
Mar 26 at 9:22
when web application is deployed on elastic beanstalk it is not connecting to aws RDS instance. But when it is running on localhost then it is connecting to aws RDS instance.
– Nishant Kumar
Mar 26 at 9:45
when web application is deployed on elastic beanstalk it is not connecting to aws RDS instance. But when it is running on localhost then it is connecting to aws RDS instance.
– Nishant Kumar
Mar 26 at 9:45
add a comment |
1 Answer
1
active
oldest
votes
Please follow the below steps to connect the mysql instance from web application:
- Copy the Endpoint from the RDS instance which will be the hostname
for your mysql database. - SSH into the EC2-Instance
Use mysql to connect to the RDS instance using the following command:
mysql -u username -p -h HOSTNAME
where HOSTNAME is the endpoint of your RDS instance.
Also, you have mentioned you have inbound all the traffic in the VPC security groups. This is not the recommended way to connect to a database.Database should always be secured from the outside world.
You have to explicitly mention the source from where the connections will be coming.
Eg:
Type Protocol Port Range Source
MySQL/Aurora TCP 3306 security group id of the application
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353556%2fhow-to-connect-web-application-deployed-on-elastic-benstalk-with-mysql-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please follow the below steps to connect the mysql instance from web application:
- Copy the Endpoint from the RDS instance which will be the hostname
for your mysql database. - SSH into the EC2-Instance
Use mysql to connect to the RDS instance using the following command:
mysql -u username -p -h HOSTNAME
where HOSTNAME is the endpoint of your RDS instance.
Also, you have mentioned you have inbound all the traffic in the VPC security groups. This is not the recommended way to connect to a database.Database should always be secured from the outside world.
You have to explicitly mention the source from where the connections will be coming.
Eg:
Type Protocol Port Range Source
MySQL/Aurora TCP 3306 security group id of the application
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
add a comment |
Please follow the below steps to connect the mysql instance from web application:
- Copy the Endpoint from the RDS instance which will be the hostname
for your mysql database. - SSH into the EC2-Instance
Use mysql to connect to the RDS instance using the following command:
mysql -u username -p -h HOSTNAME
where HOSTNAME is the endpoint of your RDS instance.
Also, you have mentioned you have inbound all the traffic in the VPC security groups. This is not the recommended way to connect to a database.Database should always be secured from the outside world.
You have to explicitly mention the source from where the connections will be coming.
Eg:
Type Protocol Port Range Source
MySQL/Aurora TCP 3306 security group id of the application
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
add a comment |
Please follow the below steps to connect the mysql instance from web application:
- Copy the Endpoint from the RDS instance which will be the hostname
for your mysql database. - SSH into the EC2-Instance
Use mysql to connect to the RDS instance using the following command:
mysql -u username -p -h HOSTNAME
where HOSTNAME is the endpoint of your RDS instance.
Also, you have mentioned you have inbound all the traffic in the VPC security groups. This is not the recommended way to connect to a database.Database should always be secured from the outside world.
You have to explicitly mention the source from where the connections will be coming.
Eg:
Type Protocol Port Range Source
MySQL/Aurora TCP 3306 security group id of the application
Please follow the below steps to connect the mysql instance from web application:
- Copy the Endpoint from the RDS instance which will be the hostname
for your mysql database. - SSH into the EC2-Instance
Use mysql to connect to the RDS instance using the following command:
mysql -u username -p -h HOSTNAME
where HOSTNAME is the endpoint of your RDS instance.
Also, you have mentioned you have inbound all the traffic in the VPC security groups. This is not the recommended way to connect to a database.Database should always be secured from the outside world.
You have to explicitly mention the source from where the connections will be coming.
Eg:
Type Protocol Port Range Source
MySQL/Aurora TCP 3306 security group id of the application
edited Mar 26 at 10:45
answered Mar 26 at 10:06
Aress SupportAress Support
8071 silver badge11 bronze badges
8071 silver badge11 bronze badges
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
add a comment |
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
I have already tried this. It's not working. What all changes i'll have to do in my java servlet code to connect to RDS instance?
– Nishant Kumar
Mar 26 at 17:22
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353556%2fhow-to-connect-web-application-deployed-on-elastic-benstalk-with-mysql-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
what is the issue you facing ? Any logs ?
– Mebin Joe
Mar 26 at 9:22
when web application is deployed on elastic beanstalk it is not connecting to aws RDS instance. But when it is running on localhost then it is connecting to aws RDS instance.
– Nishant Kumar
Mar 26 at 9:45