Configure database connection for AmazonRDS MySQL DB

I'm trying to setup a database connection to an AmazonRDS MySQL database. I'm an experienced OutSystems user, just trying to test connecting to an RDS DB.

I have the connection setup in Service Center with server, userid, pw.

The RDS DB is restricted by IP address. I tried doing a ping for my test site (<myname>.outsystemscloud.com), then adding that IP in the RDS Security Group.

But that doesn't work, just gives me a timeout when I click on the 'test' button in the connection setup page in Service Center.

Is there a better way to get the proper IP address?


Hello Peter,

You are trying that with a personal environment right? That should be the correct address alright. Just have in mind that the IP address might change over time.

Dear Peter,


Is the instance public accessible? 

Click on RDS instance > modify > public Accessible: yes



Thanks for replying. I appreciate the support!

I realize the IP is not static, just doing a Proof of Concept.

Yes, its public accessible. I'm able to access it via MySql Workbench from home after adding my home IP to the RDS instance Security Groups. However, it doesn't seem to like my personal environment's IP address.


Solution

This was resolved by removing the port from the URL that is used in the "Server" field of the connection string.

Solution

Peter Heberlein wrote:

This was resolved by removing the port from the URL that is used in the "Server" field of the connection string.

Hi Peter,

I am connecting mysql database using AWS-RDS kindly help which are all the steps to be followed to achieve for connection establishment in my out system.

Following information i have and also i am doing in cloud environment not my personal environment

RDS endpoint
DB port
DB name
DB user
DB pass

Database name: mysql enterprise edition 5.7

Hey Guys! Im trying to connect with an external database, i created sql server on amazonaws but i cant connect, i dont know why...

Public Acess is YES


Someone can help me?


Hello,

I am having the exact same issue, just not with an Amazon service. 

I can access the DB via MySql Workbench from home after adding my home IP to the list of access hosts, but not from the Service Center after listing the personal's environment IP. 

But it seems that the problem is not caller IP related, as I granted all IP access (and I am still accessing from my home) but I continue to get the same error. I tried the advanced configuration with the 3306 port in the connection string with the same result. I am getting a very uninformative "Connection String test failed: Unable to connect to any of the specified MySQL hosts." error.

Can anybody help?

Thanks,

Pedro

Hi Pedro,

Try a work forward and then work back approach.

Open the security group inbound and outbound to all (0.0.0.0/0) and ensure Public Accessibility is enabled.



Ensure the user you are using in workbench is the same in your connection string in your factory and has access to the required schema.




The server URL should be just the name without any suffix - i.e 


        test.crxig17hoffuy.ap-southeast-2.rds.amazonaws.com


Also, I assume you are using the cloud version of OS? (I am using on-premise) so the IP address the factory tries to connect from will be different from your home IP address. I am not overly familiar with AWS Inbound Security rules, but I think security groups and ACLs are unable able to resolve DNS hostnames.

So you could try pinging your personal cloud OS URL to determine its current IP address but it's likely to change in the future which would then break your ACL's in AWS. If the change in the ACL's to 0.0.0.0/0 fixes your problem, you may have to live with this (not sure if there is a best practices guide on OS for this or not) 


Cheers, Mark