Lost connection to MySQL server during query Socket error

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sachse
Posts: 3
Joined: Tue 26 Aug 2008 21:37

Lost connection to MySQL server during query Socket error

Post by sachse » Tue 26 Aug 2008 21:52

I get following error:

"Lost connection to MySQL server during query Socket error on write. WSAGetLastError return 10054($2746)"

An other connection via mysql console client has worked very well.
The program had accessed the datatabse with a query before, that works very well.

If the mysql server is on a linux machine all works very well.
But if mysql on localhost (winxp sp3) is used this error occurs while executing a mycommand1.execute.

I had read the answer of Antaeus to the post of crafty from Fri Mar 14, 2008 1:39 pm.

This does not solve my problem because I use mycomand.

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Re: Lost connection to MySQL server during query Socket error

Post by eduardosic » Wed 27 Aug 2008 03:20

sachse wrote:I get following error:

"Lost connection to MySQL server during query Socket error on write. WSAGetLastError return 10054($2746)"

An other connection via mysql console client has worked very well.
The program had accessed the datatabse with a query before, that works very well.

If the mysql server is on a linux machine all works very well.
But if mysql on localhost (winxp sp3) is used this error occurs while executing a mycommand1.execute.

I had read the answer of Antaeus to the post of crafty from Fri Mar 14, 2008 1:39 pm.

This does not solve my problem because I use mycomand.
after this exception you can connect to database? ou you have the wait a time?

if true it's a bug in efemeral port's with windows.. i have the solution

create a reg file and put this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:0000fffe
"TcpTimedWaitDelay"=dword:0000001e

restart the machine and enjoy.

Post Reply