Home > Backend Development > PHP Tutorial > Solution to the very slow PHP remote connection to MYSQL database_PHP Tutorial

Solution to the very slow PHP remote connection to MYSQL database_PHP Tutorial

WBOY
Release: 2016-07-21 15:51:07
Original
1300 people have browsed it

I don’t know how to solve it, so I installed MYSQL on the server where his space is located to solve the problem. Today I have this problem again. I can’t install MYSQL on this server as well. Search:

PHP Remote The connection to MYSQL is slow. Sometimes it takes 4-20 seconds to connect to MYSQL remotely. The local connection to MYSQL is normal. The main reason for this problem is that the MYSQL installed by default has reverse DNS resolution enabled. In my.ini (WINDOWS system) or MY.CNF (under UNIX or LINUX system) file, add the sentence skip-name-resolve under [mysqld] and save it.

Start--"Run--"cmd--"net stop mysql--"net start mysql--"Haha, success

The path where my.ini is located is such as: D:Program FilesMySQLMySQL Server 5.0my.ini

It turns out to be a problem with MySQL. After this operation, the host name cannot be used in the authorization table of MySQL and only the ip can be used.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319239.htmlTechArticleI didn’t know how to solve it, so I installed MYSQL on the server where his space is located and the problem was solved. Today There is another problem. You can’t install MYSQL on this server. Searc...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template