MySQL:Can’t connect to MySQL server (10060) from remote client, on windows xp.

I tried connecting to MySQL Server using MySQL query browser but i was getting above error. I found following solution in MySQL forum.

http://forums.mysql.com/read.php?34,49742,239961#msg-239961

I found the problem: i had not added the MySQL Server port in firewall’s exception list.

//<———–part 2

Actually there is no MySQL error with no. 10060. The actual error no. is at the begninning of the error message.(may be ERROR 2003 etc.)

Typically this kind of error message you see due to authentication issues. There could be many reason:
1. The MySQL server isn’t running.
2. Port at which MySQL server is listening is blocked for you.
3. Port at which MySQL server is listening cann’t accept any connection from outside world due to Firewall.

Actually if it is a problem due to Firewall, no need to turn off firewall, you just have to include MySQL listeining port in to unblock/exception list of firewall.

If your MySQL server is running on windows xp, following is the way to deal with firewall problem:
1. Go to Control Panel -> Windows Firewall (Windows Firewall dialog gets open.)
2. Go to Exceptions Tab and click on ‘Add Port…'(Add a Port dialog gets open.)
3. Give the appropriate name.(e.g., MySQL)
4. Give the listening port of MySQL.(Most commonly 3306)
5. Also make sure TCP radio button is selected.

Here is the complete tutorial on how to add a port to Firewall exception list on windows xp.

If sill problem persist refer MySQL documentation, on mysql website for problem regarding MySQL server connection problem.
//———->
modification history:

1. Nov 18, 2009: Due to lot of visit to this post, i added more detail as part 2.

please let me know if this post is useful.

Advertisements

.Net and MySQL: Example of using MySQL and .Net: A simple example of useing Connector/Net 5.2 to connect with MySQL from .Net

Follow this process:

  1. Download Connector/Net 5.2.
  2. Unzip the binaries. You will find 3-4 dlls along with other files.
  3. Add reference to mysql.data.dll, in your project.
  4. You can connect to MySQL throw code, as described below:

String conString = “server=server_name; user id=user_name;

password=password; database=db_name; pooling=false;”;

String queryString = “select * from employee;”;

using (MySqlConnection mySqlConnection = new MySqlConnection(conString))

{

using (MySqlDataAdapter adapter = new MySqlDataAdapter(queryString, mySqlConnection))

{

DataTable dt = new DataTable();

adapter.Fill(dt);

dataGridView1.DataSource = dt;

}

}

Published in: on July 27, 2009 at 8:39 pm  Leave a Comment  
Tags: , , , , , ,

C# .Net and MySQL: how to connect MySQL from .Net ?

I was wondering how to connect MySQL with .Net then i got following solutions in net:

http://www.15seconds.com/issue/050407.htm

http://dev.mysql.com/tech-resources/articles/dotnet/index.html#ADO.NET

There might be several other articles describing several other ways to connect with MySQL from .Net but I found Connector/Net 5.2 from MySQL good.

MySQL Query Browser :: font difficult to read, distorted…bug???

Today, after restarting the system… i started MySQL Query Browser . But i got result set window showing me weired text. Though it was showing me query which i opened but font was distorted and giving me panic. I searched in net and found this solution, though it is not perfact, but it worked.

It seems a bug in tool.

Published in: on July 26, 2009 at 5:58 am  Leave a Comment  
Tags: , , ,