Problem connecting to MySQL
-
Hi, I am trying to connect to mySql using C# but getting this error:
Quote:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I have added the port thinking it could solve the issue! but still the same.. here is my connection string:
<add name="SQLdb" connectionString="server=192.168.0.1;port=3306;User Id=root;password=Mxjxaxax0x1;Persist Security Info=True;database=cure"
providerName="MySql.Data.MySqlClient" />please help...
-
Hi, I am trying to connect to mySql using C# but getting this error:
Quote:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I have added the port thinking it could solve the issue! but still the same.. here is my connection string:
<add name="SQLdb" connectionString="server=192.168.0.1;port=3306;User Id=root;password=Mxjxaxax0x1;Persist Security Info=True;database=cure"
providerName="MySql.Data.MySqlClient" />please help...
The answer is bound to be here :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
-
The answer is bound to be here :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
Thanks BUT now this is my connection in the App.config:
<add name="SQLdb"connectionString="server=192.168.0.1;port=3306;Uid=root;Pwd=xxxxxxxxx;database=cure;" providerName="MySql.Data.MySqlClient" />
but I am still getting: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond just one notes: The same code is working if I run the application on the server itself (using IP not localhost)
-
Thanks BUT now this is my connection in the App.config:
<add name="SQLdb"connectionString="server=192.168.0.1;port=3306;Uid=root;Pwd=xxxxxxxxx;database=cure;" providerName="MySql.Data.MySqlClient" />
but I am still getting: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond just one notes: The same code is working if I run the application on the server itself (using IP not localhost)
What happens if you try to connect to the database using a standard MySQL client? It almost looks like a firewall may be blocking your connection.
-
What happens if you try to connect to the database using a standard MySQL client? It almost looks like a firewall may be blocking your connection.
it works when I connect using mySQL client but the good news.. I figured out the problem... I just address connection timeout=120 it seems like it's taking time to connect! anyhow.. thanks...