07 Dec

corrupted / crashed MyISAM + mysql_repair_threads = stuck “Repair with N threads”

In this post we’re going to look at how changing MySQL variable mysql_repair_threads for betterment of a repair table command became root cause of an instance reboot. Also how repair with n threads message tracks down to this.

MyISAM is notorious for table crashes and always need a table repair as a quick remedy.

 Table 'myisam_table' is marked as crashed and should be repaired.

After seeing above error we quickly jump on to one of the following

 repair table myisam_table
 myisamchk -r -q myisam_table

Ofcourse there are more options but that’s not something we’re talking here.

Once this become regular and/or table is large, we look forward to speedup the operation. Then stands out one variable that comes as a ray of hope: mysql_repair_threads
As MySQL documentation says “for value greater than 1, MyISAM table indexes are created in parallel (each index in its own thread) during the Repair by sorting process.” Read More

04 Dec

Fixing inconsistency on MySQL Slave of Galera Cluster

Checksum is a standard practice among DBAs to verify the data consistency across replicated nodes. In this post we’re going to review the syncing options for an inconsistent MySQL slave of Galera cluster node.

Here we’re assuming a setup of regular replication to a MySQL instance from one of the Galera cluster nodes.
PXC-slave-checksum Read More

04 Nov

Setting-up second mysql instance & replication on Linux in 10 steps

We often see requirement for having multiple MySQL instances on same machine for restore, testing or backup purposes.
This post will help you configure second MySQL instance on same machine and also setup replication between them.

This is a quick setup guide of 10-steps to install and configure MySQL instance on 3307 port, and make it slave from MySQL running on port 3306. Read More

19 Oct

pt-table-checksum & Waiting to check replicas for differences: 0% 00:00 remain

I recently came across an issue where the task was to checksum databases using Percona’s pt-table-checksum. The command continued well for all the databases but when it came to specific DB, it kept on showing following error:

Waiting to check replicas for differences: 0% 00:00 remain

As this did not change for hours (was in screen session), I cross-checked that nothing blocks the process and other options!

Read More

17 Aug

How to Add Remote MySQL Server to Nagios Monitoring

We already have seen two articles for setting up MySQL Monitoring with Nagios and Percona Monitoring Tools for Nagios. Those posts covers configuration of nagios on single instance.

Though following questions came to me: Do you need to setup Nagios again on all servers that we want to monitor? How do you add another MySQL server to this monitoring?

This post is an answer to those questions.

To add remote server to nagios monitoring, We need NRPE (Nagios Remote Plugin Executor) along with Xinetd (Extended Internet Daemon) and Nagios Plugins to be setup.

(This assumes you have already setup the nagios server and adding new host. Refer links in first line of the article)

Steps to add Remote MySQL server to Nagios Monitoring:

Read More

-- Kedar Vaijanapurkar --