Slow remote connection to MySQL

Source: Internet
Author: User
Tags reverse dns

Remote connection to MySQL is slow. Sometimes it takes 4-20 seconds to remotely connect to MySQL. The local connection to MySQL is normal. The main cause of this problem is that the reverse DNS resolution is enabled for the MySQL instance installed by default, in my. INI (in Windows) or my. add the skip-name-resolve statement to the [mysqld] of the CNF (Unix or Linux) file and save it.

Start -- run -- cmd -- net stop MySQL -- Net start MySQL -- Haha, success

Path of my. ini: D: \ Program Files \ mysql \ MySQL Server 5.0 \ My. ini

It turned out to be a problem with MySQL. After this operation, the host name cannot be used in the MySQL authorization table, but only the IP address can be used.

--- Timeout settings

Interactive_timeout = 28800000
Wait_timeout = 28800000

Skip-name-resolve

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.