Hi
I have a MySQL data at a web hotel. I can connect to the database from my web application hosted at the hotel . But trying to connect from a client application running on my PC fails using the same ConnetionString. The error is: Unable to connect to any of the specified MySQL hosts
In fact the method below (the method is protected in the web application) fails in my client application but works in my web application.
private void button8_Click(object sender, EventArgs e)
{
string MyConString = "server=db.MYSITE.dk;user id=USERID;" +
"pwd=PASSWORD;database=DATABASE" ;
label1.Text = label1.Text + MyConString;
MySqlConnection connection = new MySqlConnection();
connection.ConnectionString = MyConString;
try
{
connection.Open();
}
catch (MySqlException ex)
{
label7.Text = ex.Message;
}
}
I just tried to download WorkBench 5.2 and it connects to the database from my PC when supplying server and password information.
Any help that will allow me to connect to the database from my client application I much appreciated. I use connector 6.2.4
Lars-Bo
I have a MySQL data at a web hotel. I can connect to the database from my web application hosted at the hotel . But trying to connect from a client application running on my PC fails using the same ConnetionString. The error is: Unable to connect to any of the specified MySQL hosts
In fact the method below (the method is protected in the web application) fails in my client application but works in my web application.
private void button8_Click(object sender, EventArgs e)
{
string MyConString = "server=db.MYSITE.dk;user id=USERID;" +
"pwd=PASSWORD;database=DATABASE" ;
label1.Text = label1.Text + MyConString;
MySqlConnection connection = new MySqlConnection();
connection.ConnectionString = MyConString;
try
{
connection.Open();
}
catch (MySqlException ex)
{
label7.Text = ex.Message;
}
}
I just tried to download WorkBench 5.2 and it connects to the database from my PC when supplying server and password information.
Any help that will allow me to connect to the database from my client application I much appreciated. I use connector 6.2.4
Lars-Bo