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...
How to Easy Manage Database Updates and Security Patches
Database security requires careful planning, but it is important to remember that security is not a state, it is a process. Once the database is in place, monitoring, alerting and reporting on changes are an...
Setting Up a Geo-Distributed Database Cluster Using MySQL Replication
A single point of failure (SPOF) is a common reason why organizations are working towards distributing the presence of their database environments to another location geographically. It's part of the Disaster Recovery and Business Continuity...
How to Enable TimescaleDB on an Existing PostgreSQL Database
If you have a PostgreSQL cluster up-and-running, and you need to handle data that changes with time (like metrics collected from a system) you should consider using a time-series database that is designed to store...
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...
What to Look for if Your PostgreSQL Replication is Lagging
PostgreSQL is designed to handle multiple threads, such as query parallelism, or deploying worker threads to handle specific tasks based on the assigned values in the configuration. But, sometimes replication lag and other issues can...
What to Check if MySQL Memory Utilisation is High
One of the key factors of a performant MySQL database server is having good memory allocation and utilization, especially when running it in a production environment. But how can you determine if the MySQL utilization...
What to Look for if Your MySQL Replication is Lagging
A master/slave replication cluster setup is a common use case in most organizations. Using MySQL Replication enables your data to be replicated across different environments and guarantees that the information gets copied. It is asynchronous...
How Do I Know if My PostgreSQL Backup is Good?
Backups are a must in all Disaster Recovery Plan. It might not always be enough to guarantee an acceptable Recovery Point Objective, but is a good first approach. The problem is what happens if, in...
How to Protect your MySQL or MariaDB Database From SQL Injection: Part One
Security is one of the most important elements of the properly designed database environment. There are numerous attack vectors used with SQL injection being probably the most popular one. You can design layers of defence...
Managing Database Backup Retention Schedules
Attention: Skip reading this blog post if you can afford unlimited storage space. If you could afford unlimited storage space, you wouldn't have to worry about backup retention at all, since you could store your...