Solve the problem of slow remote connection to mysql

Source: Internet
Author: User
Tags reverse dns
After the MySQL database receives a network connection, it first obtains the IP address of the other party, and then performs reverse DNS resolution on the IP address to obtain the host name corresponding to the IP address. Use the host name in the permission system for permission determination. Reverse DNS resolution is time-consuming and may make users feel slow. Sometimes

After the MySQL database receives a network connection, it first obtains the IP address of the other party, and then performs reverse DNS resolution on the IP address to obtain the host name corresponding to the IP address. Use the host name in the permission system for permission determination. Reverse DNS resolution is time-consuming and may make users feel slow. Sometimes

After the MySQL database receives a network connection, it first obtains the IP address of the other party, and then performs reverse DNS resolution on the IP address to obtain the host name corresponding to the IP address. Use the host name in the permission system for permission determination. Reverse DNS resolution is time-consuming and may make users feel slow. Sometimes, if the host name resolved in reverse direction does not point to this IP address, the connection will fail.

You can disable reverse DNS resolution for MySQL in the configuration file. You only need to add the following lines to the [mysqld] section of f:

Skip-name-resolve (same for windows and linux ).

At the same time, note that after this configuration parameter is added, the host field in the mysql authorization table cannot use the domain name but only the IP address, because this is the result of domain name resolution is forbidden.

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.