Thursday, January 27, 2011

Slow Mysql Connection Over Firewall

Encountered this problem 2 days ago at work. An application that works perfectly suddenly stop working. Our system consists of an application server, mysql database server and client terminals operating in corporate LAN environment.

The problem starts to occur when the database and application server are separated into 2 different firewall segments. Database connection from the application server to the database slows down significantly. Managed to solve the problem by adding skip-name-resolve in my.ini just under [MySqld] tag.

This problem may occur because mysql try to resolve the host name from ip address but the firewall block this dns traffic. Details can be found in this url: http://dev.mysql.com/doc/refman/5.0/en/dns.html
Published with Blogger-droid v1.6.5