Unable to connect to any of the specified MySQL hosts.

Hello, I am New to Outsystems..

I am trying to connect to an local Server for an required database,  But this server is on remote location and i am working with outsystems personal Environment but for some reason i am not able to connect to the required database  every time i tried to connect it from service centre it poped same error message of Connection String failed

I went through many available discussions on forum but i couldn't understand the solution 

Basically i want test and try to connect my application to a local existing database !

Champion

Hi,


Do you put port on the Server ?

MySQL usually using 3306

so the server field is something like this : esblablabla.com,3306


mvp_badge
MVP

Hi DS,

For connecting external database in personal environment your database should be publically accessible because personal environment runs on cloud so any external database should be accessible through internet.

So make sure you MySQL database is not in private or local network and not IP restricted.

Hello Nikhil, 

The thing i am testing and trying to connect it without making the database public due to security and confidentiality issue thus, i cannot make it public, so is there any other way apart of making the database public ?


mvp_badge
MVP

Hi DS,

I don't think there is any other way to connect to the external database in personal environment without making it public.

You have to allow public access either by whitelisting your outsystems environment IPs or any other way.

In some of the ways, spacing and the order of parameters in the MySql connection string does matters.

So stick to the standard format 

MysqlConn.ConnectionString = "Server=localhost;Port=1234;Database=My_Mysql_Database;Uid=root;Pwd=root;"

If the above connection string fails,  try update your c# mysql connection string as shown below (without port variable as well):

MysqlConn.ConnectionString = "Server=localhost;Database=My_Mysql_Database;Uid=root;Pwd=root;"

Or, sometime the problem could be on your windows firewall, make sure your server allow access to all port associated with your mysql database.



Hi DS,

Please check your user name. server details and all. Because if you are providing right details then nothing will wrong. Please check sample data how to fill details

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