I am having some trouble.

I have a Linux Server hosting 5.1 MySql.

The Windows clients are running a POS Program written in C# using the .Net Connector.

The Problem is that the initial connection takes around 12 Seconds which is not a big problem, but when you let it idle for a couple of minutes it seems to close the connection and requires another 12 seconds to reconnect.

Once connected it works fine and is very snappy.

I read on a few posts it could be a NETBIOS issue but that is an ODBC driver issue and it seems to be solved.

Is anyone else facing this issue?

After trying to figure this out I have found a solution.

If you want to follow how i concluded the solution it's here.

If you just want the solution.

Find your my.cnf file on your Linux Server.

Usually in /etc/my.cnf

in Ubuntu based distribution it's in /etc/mysql/my.cnf

Scroll Down to the [mysqld] section

add the following line


This is the Updated Code for MySql 5.0+


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.