How to Restore a Specific Collection in MongoDB Using Logical Backup
Keeping backups of your database is one of the most important tasks in any production environment. It is the process of copying your data to some other place to keep it safe. This can be...
How to Replace an Intermediate MySQL or MariaDB Master with a Binlog Server using MaxScale
Binary logs (binlogs) contain records of all changes to the databases. They are necessary for replication and can also be used to restore data after a backup. A binlog server is basically a binary log...
How to Fix a Lock Wait Timeout Exceeded Error in MySQL
One of the most common InnoDB errors is InnoDB lock wait timeout exceeded, for example: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction The above simply means the transaction has reached the...
How to Rebuild an Inconsistent MySQL Slave?
MySQL slaves may become inconsistent. You can try to avoid it, but it’s really hard. Setting super_read_only and using row-based replication can help a lot, but no matter what you do, it is still possible...
Using MariaDB Flashback on a MySQL Server
MariaDB has introduced a very cool feature called Flashback. Flashback is a feature that will allow instances, databases or tables to be rolled back to an old snapshot. Traditionally, to perform a point-in-time recovery (PITR),...
How to Rebuild an Inconsistent PostgreSQL Slave
PostgreSQL Streaming Replication is a great way of scaling PostgreSQL clusters and doing it adds high availability to them. As with every replication, the idea is that the slave is a copy of the master...
How to Protect Your MySQL & MariaDB Database Against Cyberattacks When on a Public Network
It is sometimes inevitable to run MySQL database servers on a public or exposed network. This is a common setup in a shared hosting environment, where a server is configured with multiple services and often...
When Should I Add an Extra Database Node?
The fact that people are not easily convinced to have an additional database node in production due to cost is somewhat absurd and is an idea that should be put aside. While adding a new...
Steps to Take if You Have a MySQL Outage
A MySQL outage simply means your MySQL service is not accessible or unresponsive from the other's perspective. Outages can be originated by a bunch of possible causes.. Network issue - Connectivity issue, switch, routing, resolver,...
My MySQL Database is Out of Disk Space
When the MySQL server ran out of disk space, you would see one of the following errors in your application (as well as in the MySQL error log): ERROR 3 (HY000) at line 1: Error...
Creating a Cold Standby for PostgreSQL Using Amazon AWS
The need to achieve database High Availability is a pretty common task, and often a must. If your company has a limited budget, then maintaining a replication slave (or more than one) that is running...
How to Backup an Encrypted Database with Percona Server for MySQL 8.0
Production interruptions are nearly guaranteed to happen at some point in time. We know it so we plan backups, create recovery standby databases, convert single instances into clusters. Admitting the need for a proper recovery...