mysql remote connection is slow

Mysql database server on a remote server in your own connection speed, but in my local connection really surprisingly slow, slow access to the database, data table is opened slowly, everything slow. Think before have seen the remote link should resolve the problem after the MySQL query related documents and Web search, found a configuration seems to solve this problem is to add the following configuration parameters in the MySQL configuration file, skip-name- Resolve :

1 $ vim /etc/mysql/mysql.conf.d/mysqld.cnf
2 
3 [mysqld]
4 ...
5 skip-name-resolve  # 添加
6 
7 $ service mysql restart

Note that this configuration is added to the [mysqld] Next, after changing the configuration and save it, and then restart mysql remote connection test, all restored as ever, speed is significantly faster.

Also, please note that the increase in the configuration parameters, host field in the grant tables mysql not be able to use the domain name can only use the ip address, because it is the result of banned domain name resolution.

Guess you like

Origin www.cnblogs.com/cpl9412290130/p/11914970.html