Slow MySQL remote connection [unsolved]

Source: Internet
Author: User

The local access to MySQL is fast. Several hundred queries are completed in seconds. When the database is set up to an internet server for remote access, the same query will take xx. XX seconds can only be described by turtles.

The following method is generally used to accelerate the speed (Not successful yet)

Configure the mysql. ini file as follows:

[Mysqld]
Skip-name-resolve
Skip-grant-tables

This solves the problem of slow remote access. However, using the skip-grant-tables system, no access control is required for any user's access, and any user name can log on and operate all databases. Is it dangerous?

If you want to allow remote connection and do not allow all permissions, configure it as follows:

The local connection user uses the IP address 127.0.0.1 to connect. the mysql. ini file is configured as follows:

[Mysqld]
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.