MySQL connection requiring time to open

I am using MySQL on a Wamp server. It takes 0.6 seconds to establish a connection to the mysql database, however, when I use a persistent connection, it takes 0.035 seconds. I am reading user comments on the php manual and found that mysql_pconnect is about to end. Any suggestion on how to improve connection time?

+3
source share
1 answer

There should not be 0.6 seconds. Slow connection time is almost always associated with DNS lookups .

Try starting the MySQL server with a parameter skip_name_resolvein your file my.ini.


, : , .

, . , ?

+3

Source: https://habr.com/ru/post/1765453/


All Articles