I'm trying to connect my c# application with openshift database. But I get this exception on the conn.Open()
Eccezione => MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
in MySql.Data.MySqlClient.NativeDriver.Open()
in MySql.Data.MySqlClient.Driver.Open()
in MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
in MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
in MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
in MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
in MySql.Data.MySqlClient.MySqlPool.GetConnection()
in MySql.Data.MySqlClient.MySqlConnection.Open()
this is my method:
public void connect()
{
string connStr = @"Server=test-lound.rhcloud.com;Port=3306;Database=test;Uid=XXXX;Pwd=YYYY;";
MySqlConnection conn = new MySqlConnection(connStr);
try
{
Console.WriteLine("Connecting to MySQL...");
conn.Open();
Console.WriteLine("Connection successfull !");
conn.Close();
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine("Eccezione => " + ex.ToString());
}
Console.WriteLine("Done.");
}
what I doing wrong? Is possible establish a connection with a openshift database through c# client application?
Edit: I found this document here that describes an SSH tunnel requirement. Perhaps that is necessary.