MySQL skip slave error in GTID based Replication

In this post I will share the smartest way to skip slave error like duplicate entry, missing rows etc. in MySQL GTID based replication. In normal replication it is quite easy to skip an error but in GTID based it becomes quite tricky to do the same. The traditional method of inserting a empty transaction … Read more

Simple MySQL Shell script for backup using Mysqldump

Here we will write a Shell/Bash script for taking MySQL backup using Mysqldump command. You can schedule this in cron for daily backups. Shell Script for Backup using MySQLDump: #!/bin/bash # MySQL database credentials user=”your_username” password=”your_password” host=”localhost” db_name=”your_database_name” # Other options backup_path=”/path/to/backup/directory” date=$(date +”%d-%b-%Y”) # Backup filename backup_file=”$backup_path/$db_name-$date.sql” # Dump the MySQL database mysqldump –user=$user … Read more

MySQL Error: 1142, SELECT command denied to user

So I went through the error while migrating one of the app to cloud. The full error statement goes like : MySQL Error: #1142. Response form the database. SELECT command denied to user “username@ip” for table “table1” From the error statement it looks like that ‘SELECT’ access is missing for the user for that particular … Read more

Shell script to check MySQL Replication Status

Working as MySQL DBA I’ve faced the MySQL replication issue almost every other day, I would say one of the weak point of MySQL RDBMS is the replication and replication down/delay is one of the most common error which can be seen in MySQL replication setups. Let’s discuss how as a DBA or as site … Read more

How to restore single database from MySQLdump

In this post we will discuss about how to restore single database from a full backup dump taken using mysqldump. I’m writing this post because as a MySQL DBA I have faced this scenario where we have a full backup file with more than 100 databases backup, and we are required to restore a single … Read more