Page 1 of 1

mySQL remote connection takes 4 secs

Posted: Thu Aug 24, 2006 8:42 am
by alexmaster_2004
Hi all
I have two dedicated servers. One Linux(FC5) webserver and one Windows(Server 2003) dedicated for MySQL.
The linux server hosts a big website that runs under PHP5. When i try to connect from PHP to the windows server, it takes almost 4 seconds before the connection is made. This delay is way too long for my web-application.
The connection is made on this way in PHP:

Code: Select all

mysql_connect($remote_sql_server, $db_user, $db_pass, false, 2);
Hope anyone can help.
Thanks

Posted: Thu Aug 24, 2006 10:12 am
by feyd
Are you sure it's not a database configuration problem? To test, you could attempt a command line connection from the Linux server to the Windows one. If that takes a similar amount of time (it should be slightly faster,) then I would consider looking deeply at the configurations or possible a network connection issue such as too many collisions and/or hops between them.