Q:

How to limit the number of MYSQL Database connections? 

I am developing an application in Java which will be distributed across many people.  However I don't want a thousand clients connected at the same time therefore I want to limit the number of connections on my Apache MYSQL Server.  I am using xampp for this and I wanna know how do I limit/change the number of connections at one time.  

A:

Your question is really broad, so my answer has to be broad as well. 
You should study more how connections and clients work. 
Just because you have thousands of clients, it doesn't mean you will need thousands of connections.  This is because every client doesn't take up one connection. 
What happens is, at some level, a pool of connections is created and this pool of connections is shared amongst all client calls. 
The last "p" in your xampp means PHP (or Perl), so they would be the ones responsible for controlling the connection pool.  So, my advice is look for connection pools in PHP or Perl. 
As an example on how to use connection pool with Java, follow this tutorial: http://www.javaworld.com/article/2076221/jndi/dive-into-connection-pooling-with-j2ee.html

