Stay /etc/my.cnf Add the following sentence to the configuration file of, Ban DNS Analysis of the response, It's going to speed it up a lot MySQL Speed of connection. usr/local/mysql/bin/mysqld_safe -skip-name-resolve -user=mysql&Īdd -skip-name-resolve Such a parameter can, close mysql Of dns Reverse query function. mysqld Will try to check back IP -> dns, Due to the slow parsing of reverse query, You won't be able to cope with too many queries. Look up mysql The official website learned that, This is a special setting on an official system, Just think of him as mysql One of the bug Forget it, No matter the way of linking is through hosts or IP The pattern of, He would be right DNS Reverse check. There are a lot of unauthenticated user Try to login mysql Situation of, When this happens without limitation, it causes the system to be very slow. Just MySQL In itself, The problem is mysql dns Anti parsing
Simple dns plus 清除缓存 plus#
If mysql The server doesn't have a remote account, It's just my.cnf Inside plus skip-grant-tables
![simple dns plus 清除缓存 simple dns plus 清除缓存](http://img.xitongcheng.com//upload/20161031/1477896781404.png)
![simple dns plus 清除缓存 simple dns plus 清除缓存](https://www.jgeek.cn/uploads/Forest_files/65158922.png)
If you use –skip-grant-tables The system will not do any access control for any user, But you can use mysqladmin flush-privileges or mysqladmin reload To turn on access control The default is show databases Statement is open to all users. There's also the question of authority, When a user sets a limit to access only one database, If this database is deleted, Then rebuild the specified database, Restrict users from accessing this data, It's about the time to delete the database, The access rights of the user are also deleted, Details can be found in mysql.db The record of however, In this way, you can't MySQL The host name is used in the authorization table of ip Format.
![simple dns plus 清除缓存 simple dns plus 清除缓存](https://img-blog.csdnimg.cn/20201230160312341.png)
Option can be disabled DNS analysis, The connection will be much faster. Later I found a solution on the Internet ,my.cnf Add inside But when the server is put on the Internet, Database access becomes very slow. When the server is in the LAN for testing, Database access speed is still very fast.