Category Archives: MySQL-Articles

MySQL related blog posts

01 Jul

Monitoring MySQL Database Backups

It’s important to monitor the (database) backups after you set-it-up. In this post we will answer a few how to monitor MySQL Database backups solutions – monitoring methods.

We should see suggestions for:

  • Monitoring Holland MySQL Backup
  • Monitoring mysqldump backups
  • Monitoring Xtrabackup using log
  • Monitoring Backups using Nagios

Usually we can have our backup script capable of detecting the status of the backup and send an success / failure email accordingly. Alternatively the backup script can write the status to backup logs and the monitoring system should be capable of reading logs, determine the backup failure and alert.

Read More

30 Jun

Install Percona Monitoring Tools for Nagios – MySQL Plugins

Recently a friend asked about Installing Percona Monitoring Tools for Nagios as he was facing a few issues. I managed to set-it-up on my ubuntu VM. Sharing the the work-log of Nagios and Percona Monitoring Plugins setup steps here for some-one who’s looking for the same!

Install Nagios on Ubuntu – steps:

(skip to Percona Monitoring Tools – Nagios Plugin Setup)

Install dependencies:

sudo apt-get install build-essential libgd2-xpm-dev apache2-utils libssl-dev

Configure Nagios users & group:

Read More

24 Jun

UMASK & UMASK_DIR – changing default MySQL file dir permissions

UMASK and UMASK_DIR are amongst few MySQL Environment variables which defines directory and file creation modes (file permissions). In this post we will understand using UMASK & UMASK_DIR for changing the database directory and file permissions from it’s default to what we need.


Changing default MySQL permissions using UMASK & UMASK_DIR


Let’s build some background first. Earlier we learnt about setting-up MySQL database backup using holland and xtrabackup. As a routine I have seen database backups being run under users other than “mysql” or “root” for such physical backups (looking at security aspect). For that, we need to add this backup-user to mysql group and grant the group read and exec permissions on MySQL datadir.

Adding backup user to mysql group:
usermod -a -G mysql backup

Granting group-read,execute permissions to backup user (on MySQL datadir):
chmod g+rx /mysql/data -R

Read More

02 Jun

Setup and configure MySQL backup using Holland and Xtrabackup

Setting up a database backup is a primary task for database administrators and we see perl and shell scripts wrapped around few of the backup-tools in practice. With right tools things can look easy and today we shall look into one of that!

MySQL Database backup can be done with mysqldump, mysqlhotbackup, xtrabackup, lvm / file-system snapshots or doing delimited-text file backups.

In this post we will learn setting up and configuring MySQL backup using Holland backup framework & Xtrabackup. We won’t be needing any scripts šŸ™‚ (let’s have short intro first…)

Read More

28 Apr

How-to extract from mysqldump | mysql-dump-splitter recipes

The latest mysqldumpsplitter (v 5.0) is out. I’d like to make it easier for everyone to get started with it.Ā  So in this post you’ll get a quick & handy command-line “recipe” for extracting table, databaseĀ  or more from mysqldump.

The Mysqldumpsplitter can extract database, table, all databases, all tables or tables matching on regular expression. It can also extract multiple tables from one database or describe the contents from a mysqldump.

The tool can extract a MySQL database from a compressed or uncompressed mysqldump. It by default produces the compressed output of sqls in default out directory but you can specify target directory or uncompressed output as well.

Check out moreĀ  on recipe commands to use the mysqldumpsplitter.

Continue Reading…

-- Kedar Vaijanapurkar --