37
Views
10
Comments
Connecting to external MYSQL database

Hello

I'm on the trial version for OS11 cloud and i'm trying to use the integration builder to setup a connect to an external mysql database hosted on google cloud.

I can access this no problem from my computer using the IP/port/username/password

But when I try those same values in the integration builder its returning "Connection String test failed: Unable to connect to any of the specified MySQL hosts. "

I can't understand why this is, within google cloud i've whitelisted all IPs (which I know is fine because my local machine can connect)

Is there something else i'm missing I need to do within outsystems? Or are external connections some how disabled if you're on a trial?




UserImage.jpg
Leigh Mason

Hello

I'm not sure how they're relvant? For both the issue was due to someone trying to connect to localhost database - As mentioned i'm not I'm trying to connect to a publicly accessible Google cloud database.

Like I said I can connect to this from other platforms/local machine but just not from outsystems



2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi,

So, as per your comment you need to connect with outsystem  external DB or other platform?


Regards,

Rajat

2024-03-23 18-16-49
Bryan Villalobos

Hi @Leigh Mason ,

Have you already tried using Advanced Connection?

You can try this:

Here is the connection string and replace it with your db information:

Server=SERVER; Port=PORT; Database=DB; Uid=USERNAME; Pwd=PASSWORD


Regards,

Bryan

2019-01-07 16-04-16
Siya
 
MVP

Looks like there is a IP restriction on to your MySQL Server and hence integration builder is unable to access the same. Please find out the IP address of the Platform Server and add to the list of allowed IP's at your MySQL server end and it should work.

2019-01-07 16-04-16
Siya
 
MVP

btw you mentioned "whitelisted all IPs " please check this includes IP address of the Platform Server.

UserImage.jpg
Leigh Mason

Hello, yes all IPs are whitelisted I'm confident it's not restricted due to anything on Google cloud side.

I've also tried with a DB from https://db4free.net/ which has no restrictions on access and still gets the same result.

@Bryan Villalobos I've also tried with advanced too but unfortunately nothing works there. 

Going back to my original question can anyone confirm if doing external DB connects is enabled from trial accounts?


2024-03-23 18-16-49
Bryan Villalobos

Hi @Leigh Mason ,

In the example I gave, I am using my personal environment. So I would say, YES it should work on trial/demo/free account.

I cannot get it working using Basic Configuration and I am getting the same error that you get. But when I tried with this connection string using the Advanced Configuration Server=SERVER; Port=PORT; Database=DB; Uid=USERNAME; Pwd=PASSWORD , it magically works. I think for some reasons, Basic Configuration is not constructing the the proper connection string for MySQL.

If Advanced Configuration didn't work for you as well, you might have to contact OutSystems support.

I would gladly help to try your connection string on my environment if that is fine. You can just change the password later on once i have tested. If not, then OutSystems Support should be able to help.

Regards,

Bryan

UserImage.jpg
Leigh Mason

Thank you for your help I'm managed to get it working. Your suggestion of using advanced seems to have done the trick.

It's very strange though I managed to get it working with advanced setting on Integration Manager via the Connections screenI previously I was trying to add the connection in Integration Builder following the MSYQL wizard. I also tried adding the connection via Service Center

The connection string Integration Manager generates is:

user Id=XXXX;password=<hidden>;server=XXXXXXX;port=3306;database=XXXXX

The server/port/database are lower case, where as when I was trying in Center Service/Integration Builder it was capitalised which was maybe breaking it?


Interestingly if I then opening the working connection in Service Center it has a connection string of:

user Uid=root; Pwd=<hidden>; server=34.89.56.203;port=3306;database=leighdb


I no longer get the error that it can't connect but instead get an error that the user is not authorised. Note the "Id" has changed to "Uid" and "password" to "Pwd" so that could be why

I dont know why Outsystems has these differences between Integration Manager/Integration Builder/Service Center. But if anyone else has this problem, firstly create the Connection standalone in Integration Manager and then use the Integration Builder with the connection you just setup



2024-03-23 18-16-49
Bryan Villalobos

Glad to know it worked for you.

I did some tests yesterday but not matter what I try, i can't get it connected with Basic Configuration. I stopped because I have some other things to do and since I was able to connect using Advanced Configuration.

But I would say maybe this is a bug, or an undocumented way in connecting with MySQL.I also find this a bit weird but this is the only explanation I can think of. 

I'll try to reach out to OutSystems regarding this matter as most likely, a number of developers will be clueless on this and will keep scratching their heads, like me. :D

Regards,

Bryan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.