Have you ever experienced a situation where one moment you can connect to the MySQL database and the next moment you cannot, only to be able to connect again a second later? As you may know one cannot open infinite connections with MySQL. There’s a practical limit and more often than not it is imposed by the underlying operating system. If you’re getting:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.10' (99)
…there’s a good chance you’re hitting such limit. What might be misleading in the information above is whom (which side) is preventing the connection from being established.
Understanding the problem at hand
Whenever a client uses the network to connect to a service running on a given port of a server this connection is established through the creation of a socket: