I bought a Classic VPS from OVH with a cPanel 11.36 Installed in it, And I created a Database. Now I'm trying to connect to that database with a simple c# winform app.
MySqlConnection conn;
string myConnectionString;
myConnectionString = "server=vps158***.ovh.net; port=3306; database=My_Database; uid=user; pwd=xxxxxx;";
try
{
conn = new MySqlConnection();
conn.ConnectionString = myConnectionString;
conn.Open();
}
catch (MySql.Data.MySqlClient.MySqlException ex)
{
MessageBox.Show(ex.Message);
}
But I get the following error ?
Unable to connect to any of the specified MySQL hosts.