A server PHP connection database, the database address is used external IP, resulting in the occasional database connection handle requires 2s

Source: Internet
Author: User
Tags php mysql mysql login
This post was last edited by u011822059 on 2013-09-03 11:29:58

PHP mysql connection handle extranet ip php 2s connection handle MySQL

Title:

Server on the PHP connection server MySQL database, the database address is used external IP, resulting in occasional MySQL database connection handle need 2s,

This means that the database address of MySQL is connected to the IP of the extranet (e.g. 22.34.1.12),

Change to 127.0.0.1 will not be new, get the connection handle need 2s case,

This 2s is occasionally appearing, want to know the reason, specific point, thank you


Reply to discussion (solution)

Using any database over an extranet is not an exemplary approach and typically does not have such a server architecture.

Using any database over an extranet is not an exemplary approach and typically does not have such a server architecture.

Questions such as my topic, I use this server external IP address, occasionally appear 2s reason is what?

Direct to the MLM, people earn you 2s profit, not a ruthless


Using any database over an extranet is not an exemplary approach and typically does not have such a server architecture.

Questions such as my topic, I use this server external IP address, occasionally appear 2s reason is what?
There is only one case of accidents, there are countless cases of accidents.

This is not about the Internet.

Direct to the MLM, people earn you 2s profit, not a ruthless

Niu, can explain specifically, in the same server connected to the MySQL database, with the extranet IP address, what steps have been taken.

If there is only one IP, the direct access
If there are 2 or more IPs, you need a routing

server-> firewall->isp-> Firewall->mysql, and then a reverse, ISP this section of how many laps to be difficult to say

2s really is within the acceptable range, MySQL has a set of non-resolution domain name parameters will be enabled to see this.

2s really is within the acceptable range, MySQL has a set of non-resolution domain name parameters will be enabled to see this.
MySQL users are actually composed of host name and user name, so the MySQL login process determines the host name of the client,
This process requires the MySQL server to reverse the domain name resolution of the client's IP and determine the host name of the client.
You can modify the Skip-name-resolve parameter to set

  • Related Article

    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.