views:

389

answers:

2

I use jdbc to connect to mysql, when it is at localhost:3306, everything is OK. but when i move my application to another computer in the intranet, and use Intranet-IP:3306 to connect to mysql database, it will consume around 1 minutes to connect to mysql successfully. what's up ???? Thanks in advance !

A: 

firewalls, Internet, routing etc etc slows down your connection.

You should put your database on a intra net instead. Keep it local and behind your big firewall. You can of course have firewall and security between computers. I'd recommend that you didn't expose your mysql database connection to the Internet unfiltered that way.

Makach
it is a intranet IP !
MemoryLeak
ah, I see you edited your question :) good to see that you found an answer to your question.
Makach
+1  A: 

Well could be a DNS problem. You can disable DNS host name lookups by starting mysqld with the --skip-name-resolve option in the configuration file.

Read here for more details: http://dev.mysql.com/doc/refman/5.0/en/dns.html

ungarida
Thanks very much!
MemoryLeak