I use MariaDB / MySQL in 1 dedicated server. All databases & PHP are in local server. I don't use remote server.
When running mysqltuner, i received recommendation to use "skip-name-resolve".
So i added this code in my.cnf
skip-name-resolve
and i restarted mysql.
My questions are :
Will using skip-name-resolve
speed up my mysql ?
When i check my mysql.db & mysql.user tables, i still see my server hostname (such as "host.myserver.com" / my public dedicated IP (not 127.0.0.1) in the "host" column. Should i change the value of "host" column too? Or i just need to leave everything as-is after adding skip-name-resolve?
Monitoring the Host Cache The Performance Schema host_cache table exposes the contents of the host cache. This table can be examined using SELECT statements, which may help you diagnose the causes of connection problems. The Performance Schema must be enabled or this table is empty.
MySQL supports the use of DNS SRV records for connecting to servers. A client that receives a DNS SRV lookup result attempts to connect to the MySQL server on each of the listed hosts in order of preference, based on the priority and weighting assigned to each host by the DNS administrator.
If you are not connecting to your server from a remote host, then no, this is not going to speed up your mysql server. Slow DNS connection plus lots of remote hosts is the scenario when this option helps.
If you turn off the name resolution, then entries with IP addresss only will be used by mysql when checking the access rights.
See mysql documentation on DNS Lookup Optimization and the Host Cache for further details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With