A server PHP connection database, the database address is used external IP, resulting in the occasional database connection handle requires 2s
This post was last edited by u011822059 on 2013-09-03 11:29:58
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 php?mysql? Connection handles? Extranet IP PHP 2s Connection Handle MySQL
Share to:
------Solution--------------------
If there is only one IP, the direct access
If there are 2 or more IPs, you need a routing
------Solution--------------------
server-> firewall->isp-> Firewall->mysql, and then a reverse, ISP this section of how many laps to be difficult to say
------Solution--------------------
reference:
2s is really within the acceptable range, MySQL has a set of parameters that do not resolve the domain name 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 do the client's IP reverse Domain name resolution, determine the host name of the client.
You can modify the Skip-name-resolve parameter to set