DNS Resolution / IP Address showing in process list

  • Filter
  • Time
  • Show
Clear All
new posts

  • DNS Resolution / IP Address showing in process list


    We have a basic master ==> slave configuration, with the slave being used for read only purposes.

    There are 5 systems in our application pool accessing the data, including the slave itself (we are using it as an application server).

    We recently found out that one of our systems was not in the hosts file of the database systems and this was causing delays with MySQL due to DNS issues. This was resolved.

    I am not looking at the process list of the slave, which is also acting as an application server (i.e. reading data). I noticed in the process list that the slave's IP address of is showing instead of its resolved DNS name. In fact, in looking at our host file on this system, I see: dbslave.ourdomain.com db2 localhost.localdomain localhost app2 app2.ourdomain.com app3 app3.ourdomain.com dbmaster dbmaster.ourdomain.com app4 app4.ourdomain.com app5 app5.ourdomain.com

    The IP address of the DB Slave on the network is, this is the IP address that is showing up in the processlist:

    | 3030806 | ro_user |

    Is this an issue? Meaning, should we see:

    | 3030806 | ro_user | dbslave:39557

    I tried modifying the hosts file but that didn't seem to have an effect on it. Does the mysql service need to be restarted in order for host resolution to be updated?


  • #2
    I just realized that I didn't do a "flush hosts" command which is why the IP address in the hosts file wasn't resolving. I'd be curious to still understand if this is an issue?



    • #3
      IMHO allowing the MySQL server to do DNS lookups is asking for trouble and is also a source of unnecessary speed overhead. Web applications aim is to return answer ASAP, so why to loose more miliseconds on DNS queries ?

      And if for any reason DNS server becomes slow or unavailable then it affects your database as well.

      So I recommend this option:
      http://dev.mysql.com/doc/refman/5.1/en/server-options.html#o ption_mysqld_skip-name-resolve