Category Archives: Database

Troubleshooting MySQL Master-Slave Replication Errors

Many times I have seen broken MySQL Master-Slave syncing on various servers because of Duplicate Entry Errors. So here I am suggesting steps to overcome these issues.

Export Data to CSV Format in PostgreSQL


The objective of this article is to enable the system administrator to convert postgreSQL data in CSV format

MySQL Master-Slave Configuration

In this tutorial, I have only shown the commands to configure Master-Slave replication as the details, pros/cons of the setup is available throughout the web.

Enable Query Cache in MySQL

If you want to get optimized and speedy response from your MySQL server then you can enable caching by using following two configurations directives to your MySQL server:

How to configure MySQL High Availability with DRBD & Heartbeat on CentOS

In this tutorial, we’re going to go through the entire process of installing, configuring and testing DRBD, Heartbeat and MySQL running in a 2 node cluster environment. This will be a general configuration for learning.

Recovering MySQL root Password

You can recover MySQL database server password with following steps:

Basic things to do when performing MySQL Server Installation

Things to configure to setup basic MySQL Server

Dual Master Replication With MySQL 5

This document describes how to set up master-master replication with MySQL 5 on Fedora 8. Since version 5, MySQL comes with built-in support for master-master replication, solving the problem that can happen with self-generated keys. In former MySQL versions, the problem with master-master replication was that conflicts arose immediately if node A and node B both inserted an auto-incrementing key on the same table. The advantages of master-master replication over the traditional master-slave replication are that you don’t have to modify your applications to make write accesses only to the master, and that it is easier to provide high-availability because if the master fails, you still have the other master.
This HowTo is a practical guide without any warranty – it doesn’t cover the theoretical backgrounds. There are many ways to set up such a system – this is the way I chose.

Set up a MySQL NDB Cluster for two servers

NOTE: three servers required for true redundancy


This HOWTO was designed for a classic setup of two servers behind a load balancer. The aim is to have true redundancy – either server can be unplugged and yet the site will remain up.