When I try to connect to a host on my LAN with mysql_connect();
, the connections succeed some of the time and fail at other times. I can always ping the MySQL server successfully, but when I try to use telnet
to connect to it through port 3306, it doesn't always work. I can connect to post 3306 the first time, but not after that.
5.1.58-1ubuntu1)[n9pK8'Ym7j1Q'khH Got packets out of order
Lost connection with host
C:\Documents and Settings\Administrator>telnet 10.253.48.49 3306
Connecting to 10.253.48.49... Cannot open connection to the host on port 3306:
Connect failed
Pinging is always successful, however:
Reply from 10.253.48.49: bytes=32 time<1ms TTL=64
Reply from 10.253.48.49: bytes=32 time<1ms TTL=64
Reply from 10.253.48.49: bytes=32 time<1ms TTL=64
Reply from 10.253.48.49: bytes=32 time<1ms TTL=64
Reply from 10.253.48.49: bytes=32 time<1ms TTL=64
Also, other clients on the LAN can connect to the host, even when I can't. I can connect to another host successfully every time. How can I solve this error?