MySQL connection slow, turn slow cause

Source: Internet
Author: User

Problem status: Recently because the server transformed the network segment, resulting in IP address transformation, after changing the use of MySQL client connection to the MySQL server and open the table in the client is very slow (regardless of the size of the table), even the connection time-out, but directly log on to the server locally connected to MySQL, the speed is normal.

Problem reason:MySQL database received a network connection, first get the other's IP address, and then the IP address of the reverse DNS resolution to get this IP address corresponding host name. Use the host name in the permission system to determine the permissions. Reverse DNS parsing is time-consuming and may make users feel slow. Even sometimes, the reverse resolution of the host name does not point to this IP address, this time can not be connected successfully.

Solution:

To avoid this process, you can append the following configuration to the MySQL configuration file my.cnf [mysqld]:
[Mysqld]
Skip-name-resolve


The following information is provided here for your reference:

1.MySQL DNS counter-check causes slow connection

2.MySQL DNS Reverse resolution causes connection timeouts

3.SSH connection slow and reverse resolution

MySQL connection slow, turn slow cause

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.