0

I am very new to AWS and Wordpress and am unable to connect to Bitnami MYSQL database server hosted in AWS form R shiny.

I want to access the Mysql database which the wordpress is using to store the data. The wordpress is was installed using Bitnami and hosted in AWS.

The AWS details are as below :

enter image description here

When I SSH to the ip, I get the BITNAMI message with a private IP login:

enter image description here

The PHP Myadmin console shows the following details of the wordpress mysql:

enter image description here

I have created a firewall rule for the port 3306 from the AWS console. Both inbound and outbound have the same setup and accepts traffic from all sources : 0.0.0.0

Now I have created one user from the above mysql console and granted it all the access :

CREATE USER 'r_user'@'localhost' IDENTIFIED BY '1234';

GRANT ALL PRIVILEGES ON * . * TO 'r_user'@'localhost';

Retrieve the data

My R server is hosted in Azure with pubic IP :52.187.238.94

The R code:

library(RMySQL)
> mydb = dbConnect(MySQL(), user='r_user', password='1234',
> dbname='bitnami_wordpress', host='34.221.144.129', port =3306);

I am getting the following error message :

> mydb = dbConnect(MySQL(), user='r_user', password='r_gom', dbname='bitnami_wordpress', host='34.221.144.129', port =3306);

Error in .local(drv, ...) : 
  Failed to connect to database: Error: Can't connect to MySQL server on '34.221.144.129' (0)

I looked at few post but not able sure if they address the same question : Can't connect to phpmyadmin in Bitnami instance hosted by AWS

Can anyone please help me to connect the Mysql server to R shiny ?

Krishnendu
  • 125
  • 3
  • 13

1 Answers1

0

Check if NACL is allowing port 3306 for incoming rules. And outgoing rule is also setup accordingly.

Check security group rules.

Mrinmoy Sen
  • 404
  • 5
  • 14