Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 262010
 

Disable DNS hostname lookup in MySQL

Answer:

If you never use MySQL authentication by hostname, it is better to disable the DNS hostname lookup for better performance. Especially if you are always connecting from localhost, or authenticate remote host by IP address)

To disable this feature, edit the MySQL configurations, e.g. /etc/my.cnf

[mysqld]
...
...
skip-name-resolve

Add the "skip-name-resolve" will do the tricks for you.

Don't forget to restart MySQL to take effect.

# /sbin/service mysqld restart

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>