292
Views
4
Comments
Connect to external database in Service Center
Question

Hi,

I am trying to connect to an external database in Service Center. Please find the below screenshot. The DB server is running on my machine only. So, I have given the server name  "127.0.0.1". When I click on the test connection,  the test connection is failed.

mvp_badge
MVP
Rank: #176

Hello Divya,

Are you using OutSystems Cloud, a personal environment, or running OutSystems On-Premise?  Using 127.0.0.1 will make the platform try to connect to a database that is running on the same server as the platform.  That means you can only reference 127.0.0.1 if all of the below apply:

  • You are running OutSystems on-premise
  • You only have 1 frontend server
  • MySQL is installed and running directly on the frontend server
Rank: #8178

Hi,

I am using a personal environment. Instead of specifying "127.0.0.1",  I have specified the exact IP address(190.60.90.154) of the machine where the DB server is running. But, It was showing the same error. 


Regards,

Divya

mvp_badge
MVP
Rank: #176

Hey Divya,

Now we have to dig into some networking configuration.  I assume you are running MySQL on a laptop or desktop of some kind, and you are connected to a router (wired or wireless, it doesn't matter)?

If this is your home network, you can do the following:

  1. Make sure your machine as a static local IP address
  2. Open port 3306 on your computer's firewall
  3. Connect to your router administration page
  4. Enable port forwarding on port 3306 to your machine
  5. Point OutSystems to your external IP address (assuming you have a static IP address, though most home internet services are dynamic so you will have to update the IP in OutSystems anytime your IP changes)

If your machine is running on a company network, you will have to work with your company's networking team to open the firewall and route it to your machine (assuming they are willing to do so).

Rank: #56938

Hello,

Following this subject, I am getting the same error while attempting to connect to a remote MySQL DB at a server that requires setting a list of access hosts by specifying their IP (or at least a portion of it and setting the rest as wildcard). I added to this list the IP address that I retrieved from the [MYPROJECT].outsystemscloud.com domain name, but the result is the above error. I am being able to access the DB from my computer, after listing its own IP as a host, so I am guessing that my problem is related with listing the correct IP for the Outsystems' caller server. Can anybody help with finding the correct IP? And if it is static?

[UPDATE] I set an entry in the access hosts list of my DB's server to grant all IP access (the complete string as wildcard) and I am still getting the same error. I am lost now. Any clues about the source of this?

Thanks,

Pedro