MySQL Forums
Forum List  »  Connector/ODBC

Solved for me
Posted by: Brian Pilati
Date: April 14, 2005 10:58AM

Christian Schlepphorst wrote:
> Hi,
>
> we had a similar problem (maybe the same?) when
> connecting to MySQL from a remote machine: 5-10
> seconds delay to establish the connection; the
> delay was not there when working locally, or when
> connecting with mysql.exe remotely.
>
> It turned out to be a problem with DNS resolution,
> i.e. the DNS service on the MySQL server was not
> working properly, and MySQL was waiting for DNS
> before answering the query. Have you tried
> skipping DNS from MySQL by setting the "skip name
> resolution" option in the MySQL Admin?

Thank you Christian, this worked for my.

I added this line to my my.conf file

[mysqld]
skip-name-resolve

and my connection speed up.

Here are my sniff results:

9.692369 172.16.3.3 -> 192.168.16.4 MySQL Server Greeting Protocol

9.693039 192.168.16.4 -> 172.16.3.3 MySQL Login Request Caps:

9.792090 172.16.3.3 -> 192.168.16.4 MySQL Response OK

9.797386 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query :

9.931831 172.16.3.3 -> 192.168.16.4 MySQL Response OK

10.234162 172.16.3.3 -> 192.168.16.4 MySQL Server Greeting Protocol

10.234567 192.168.16.4 -> 172.16.3.3 MySQL Login Request Caps:

10.373430 172.16.3.3 -> 192.168.16.4 MySQL Response OK

10.374926 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query :

10.492455 172.16.3.3 -> 192.168.16.4 MySQL Response OK

10.714601 172.16.3.3 -> 192.168.16.4 MySQL Server Greeting Protocol

10.715012 192.168.16.4 -> 172.16.3.3 MySQL Login Request Caps:

10.845537 172.16.3.3 -> 192.168.16.4 MySQL Response OK

10.846965 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

10.993671 172.16.3.3 -> 192.168.16.4 MySQL Response OK

11.013626 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Quit

11.014426 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Quit

11.296040 172.16.3.3 -> 192.168.16.4 MySQL Server Greeting Protocol

11.296465 192.168.16.4 -> 172.16.3.3 MySQL Login Request Caps

11.416941 172.16.3.3 -> 192.168.16.4 MySQL Response OK

11.418301 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

11.530079 172.16.3.3 -> 192.168.16.4 MySQL Response OK

11.534503 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

11.640722 172.16.3.3 -> 192.168.16.4 MySQL Response OK

11.641798 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Quit

11.657056 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

11.765679 172.16.3.3 -> 192.168.16.4 MySQL Response OK

12.679907 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

12.952244 172.16.3.3 -> 192.168.16.4 MySQL Response OK

13.581363 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

13.682845 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query

14.049016 172.16.3.3 -> 192.168.16.4 MySQL Server Greeting Protocol

14.049470 192.168.16.4 -> 172.16.3.3 MySQL Login Request Caps

14.161984 172.16.3.3 -> 192.168.16.4 MySQL Response OK

14.164397 192.168.16.4 -> 172.16.3.3 MySQL Request Command: Query :

Before each Query had a 10 second lag!

Thanks again

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.