Question: If I connect with Java to MySQL on my localhost server, I access instantaneously.  

But if I connect outside of the localhost, from a network PC (192.168.1.100), it is very slow (4-5 seconds).  

And, if I connect from a public IP to my MY SQL server, it is also very slow (6 seconds or more).

Answer: 
The "why" is already been answered. It's just the network latency.

You're probably also interested in how to "fix" it. The answer is: use a [connection pool](http://en.wikipedia.org/wiki/Connection_pool). If you're running a Java webapplication, use the webserver-provided connection pooling facilities. To take Tomcat as an example, check [this manual](http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html). If you're running a Java desktop application, use a decent connection pool implementation like [c3p0](http://sourceforge.net/projects/c3p0/) (tutorial [here](http://www.mchange.com/projects/c3p0/index.html)).
Network latency plus connection creation time would be my guess. I don't know what else you have between the client machine and the MySQL server.