Home / Databases / MySQL

MySQL

MySQL: replication, InnoDB Cluster, slow queries, connections and configuration. 25 posts.

MySQL / Runbook

Sev1: MySQL split brain. Two servers accepted writes after a failover

After a failover (manual or by Orchestrator, MHA or a script), the old primary came back writable and some clients kept writing to it. Fence the old primary, measure the divergence with GTIDs, reconcile the errant transactions and rebuild it as a replica.

4 min readAdvanced

MySQL / Cheat sheet

Advisory: choosing MySQL high availability - async replication, semi-sync, InnoDB Cluster, Galera or a managed service

MySQL offers several ways to survive a server failure, with different data-loss guarantees, failover speed and operational effort. Compare asynchronous and semi-synchronous replication with orchestrated failover, InnoDB Cluster/Group Replication, Galera-based clusters and managed Multi-AZ services, and decide by RPO, RTO and team skills.

2 min readIntermediate

MySQL / Runbook

Sev1: MySQL writes hang because the disk filled with binary logs

Every insert and update hangs, the error log says MySQL is waiting for disk space, and the data or binlog volume is at 100%. Free space safely by purging only binary logs that all replicas and CDC tools have read, then fix retention so it doesn't happen again.

3 min readIntermediate

MySQL / How-to

Transformation: MySQL or MariaDB to PostgreSQL with pgloader

Consolidating on PostgreSQL? pgloader converts a MySQL schema and copies the data in one command. Here are the casting rules that matter, the SQL differences to fix in the application, how to validate, and how to cut over with a short freeze or CDC.

3 min readIntermediate

MySQL / Runbook

Transformation: upgrading MySQL 8.0 to 8.4 LTS before 8.0 support ends

MySQL 8.0 reached end of life in April 2026, and 8.4 is the current long-term support release. Run the MySQL Shell upgrade checker, fix the changes that bite (authentication plugin defaults, removed replication syntax, changed defaults), and upgrade replicas first, then the source.

5 min readIntermediate

MySQL / Cheat sheet

MySQL DBA cheat sheet: client, processlist, InnoDB, sys schema, replication and backups

The MySQL commands and queries you use every week. Covers the mysql client and mysqladmin, server status and variables, sessions and locks, slow queries with the sys schema, InnoDB health, sizes, indexes, users, binlogs, replication with GTIDs, and backups with mysqldump, MySQL Shell and XtraBackup.

4 min readIntermediate

MySQL / How-to

MySQL disaster recovery: cross-region asynchronous replica with GTIDs

Set up a MySQL replica in a DR region using GTID-based asynchronous replication. Covers seeding with the clone plugin or XtraBackup, securing the channel, monitoring lag, promoting the replica, and rebuilding replication for failback.

2 min readIntermediate