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 192.168.1.226 is showing instead of its resolved DNS name. In fact, in looking at our host file on this system, I see:
127.0.0.1 dbslave.ourdomain.com db2 localhost.localdomain localhost
192.168.1.2 app2 app2.ourdomain.com
192.168.1.3 app3 app3.ourdomain.com
192.168.1.1 dbmaster dbmaster.ourdomain.com
192.168.1.4 app4 app4.ourdomain.com
192.168.1.5 app5 app5.ourdomain.com
The IP address of the DB Slave on the network is 192.168.1.226, this is the IP address that is showing up in the processlist:
| 3030806 | ro_user | 192.168.1.226:39557
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?