There are three machines on the same network. On one Mysql is spinning, the other two act as a client. At the same time, on one client machine, the connection is established in fractions of a second, for the second it connects for a long time then quickly. Checked with the command: telnet database.server 3306

The differences between the two client machines are that on one stands Ubuntu 14.04 on the other Ubuntu 16.04

The question is where to dig?

  • And how do you install the connection? Is this some kind of language, client? - cheops
  • Well, in general, I ran into a problem when setting up a connection from under jdbc. Already then, figuring out what's the matter, he noticed that when a connection was established through telnet, the same effect. - plesser
  • @plesser, and if you use not the name, but the ip-address, the problem persists? // stackoverflow.com/q/1292856/4827341 - aleksandr barakin
  • yes of course, I immediately tried it - plesser

1 answer 1

Most likely the problem is that for each client MySQL does a DNS lookup, add the following line (skip-name-resolve) to the configuration (my.cnf) in the mysqld section and restart the server

[mysqld] skip-name-resolve 

To determine the causes of such problems, study and use the tcpdump command, it will tell you at what stage the connection problem occurred.

  • Yes that's it! thanks - plesser