Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Monitoring and Taking Care of MySQL Replication

DZone's Guide to

Monitoring and Taking Care of MySQL Replication

· Cloud Zone
Free Resource

Are you joining the containers revolution? Start leveraging container management using Platform9's ultimate guide to Kubernetes deployment.

If you get your slave into production soon, you should make sure that you know how to take care of it when something goes wrong. 

Knowing that the slave is stuck can monitored using open source tools like Nagios and its MySQL plugins. In general it is wise to have such a tool to monitor all your system and business aspect including the web server and login rates.

How do I know that my slave is stuck or not?
  1. Connect to MySQL on the slave using permitted user.
  2. Run the show slave status\G command.
  3. The result should include the following lines with a Yes value. If any of them is No, there is a problem:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes

It is stuck, What should I do?
  1. Connect to the file system with a permitted user.
  2. Check the values of the replication error log and take care according to it (tail -n 50 /var/lib/mysql/responder3.spd.co.il.err).
Bottom Line
Get into production!

Using Containers? Read our Kubernetes Comparison eBook to learn the positives and negatives of Kubernetes, Mesos, Docker Swarm and EC2 Container Services.

Topics:

Published at DZone with permission of Moshe Kaplan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}