How to setup three nodes MariaDB Galera Cluster on Single server with MySQL sandbox

For the production environment, it’s recommended that we should use separate server for each Galera Cluster node but sometimes, for the testing purpose we have to setup it on one server with different ports. Here are the steps for how to do that with CentOS 6.8, MariaDB Galera Cluster 10.1.21 and MySQL Sandbox Download MariaDB 10.1.21 from this location…

How to install sysbench 0.5 on Debian 7

Normally, sysbench 0.4.12 version can be installed from repositories like “apt-get install sysbench” but the newer version 0.5 is not added in any repo yet (AFAIK) so, it’s bit difficult to install it. 1. Install bzr package if it’s not installed. (i.e apt-get install bzr) 2. Download the code from branch. (i.e bzr branch lp:sysbench) …

dpkg: dependency problems prevent configuration of mysql-workbench-community for Ubuntu 13.04

While installing mysql-workbench-community-6.0.9 on Ubuntu 13.04 if you get below error. root@Dell-XPS:/home/nilnandan/Downloads# dpkg -i mysql-workbench-community-6.0.9-1ubu1204-amd64.deb Selecting previously unselected package mysql-workbench-community. (Reading database … 203112 files and directories currently installed.) Unpacking mysql-workbench-community (from mysql-workbench-community-6.0.9-1ubu1204-amd64.deb) … dpkg: dependency problems prevent configuration of mysql-workbench-community:  mysql-workbench-community depends on libctemplate0; however:   Package libctemplate0 is not installed.  mysql-workbench-community depends on…

“Duplicate Entry” error for key PRIMARY on UPDATE query (RBR + Triggers)

Recently, I have faced one interesting issue with Master(Active)-Master(Passive) replication (RBR + Triggers). Passive master was stopped due to “Duplicate Entry” error with update statement. It was something like this. Last_Error: Error ‘Duplicate entry ‘29014131’ for key ‘PRIMARY” on query. Default database: ‘db’. Query: ‘UPDATE `db`.`tab1` SET `empid`=’103′, `name`=’Nilnandan’,  `address`=’India ‘, `postcode`=’D100′, `phone`=’878 515 7788’;…

How InnoDB works with transactions and auto recovery

How InnoDB work with transactions: When any transaction will be completed with COMMIT,  InnoDB will write those changes in InnoDB Buffer Pool. After that InnoDB will run some background operations like checkpoint.  Checkpoint is the most important operation which will writes the changes on disk.   Lets see how it will work. During the checkpoint phase,…