Database engineering topic

MySQL

MySQL specific content and tutorials

43 canonical articles

MySQL Explained (2026): InnoDB, 8.4 LTS, Replication & Production Patterns

Everything you need to know about MySQL: storage engines, replication topologies, performance tuning, and cloud deployment. From basics to advanced optimization.

MySQL9 minMay 13, 2026
Read

MySQL "Communications Link Failure": Fix wait_timeout, HikariCP & All 8 Timeout Variables

MySQL wait_timeout, net_read_timeout, innodb_lock_wait_timeout and max_execution_time — production tuning rules and the HikariCP alignment trick that prevents 'communications link failure' errors.

MySQL6 minMay 9, 2026
Read

MySQL binlog Retention, Rotation & Purge: Production Guide (2026)

Configure MySQL binlog retention safely: binlog_expire_logs_seconds, manual purging rules, AWS RDS retention, and the disk-exhaustion failure mode you should monitor for.

MySQL10 minMay 9, 2026
Read

MySQL JSON Column Performance: Indexing, Querying, and Schema Design Trade-offs

Understand when MySQL JSON columns help and hurt performance. Learn functional indexes, JSON_TABLE, and when to migrate JSON to normalized columns.

MySQL6 minDec 3, 2025
Read

MySQL Foreign Keys: Evolution from 5.7 to 8.4

MySQL's foreign key implementation has evolved significantly from 5.7 through 8.4 — with changes to metadata locking, instant DDL interactions, and Group Replication behavior that every DBA needs to understand.

MySQL8 minNov 20, 2025
Read

MySQL InnoDB Buffer Pool: Deep Dive into Pages, Chunks, and Eviction

Master InnoDB buffer pool internals: page management, chunk allocation, LRU algorithm, and tuning strategies for maximum cache efficiency.

MySQL9 minNov 17, 2025
Read

MySQL 8.0 Generated Columns: Virtual, Stored, and JSON Index Extraction

Use MySQL 8.0 generated columns to index computed values, JSON paths, and date parts. Covers virtual vs stored tradeoffs and functional index patterns.

MySQL1 minNov 10, 2025
Read

MySQL Optimizer Hints: INDEX, JOIN_ORDER, and MAX_EXECUTION_TIME

Guide MySQL query execution with optimizer hints. Covers INDEX, NO_INDEX, JOIN_ORDER, MAX_EXECUTION_TIME, and query block naming for subquery hint targeting.

MySQL5 minOct 27, 2025
Read

MySQL 8.0 Window Functions: ROW_NUMBER, LAG, LEAD, and Running Totals

Master MySQL 8.0 window functions for analytical queries. Covers ROW_NUMBER, RANK, LAG/LEAD for period comparison, running totals with SUM OVER, and NTILE quartiles.

MySQL5 minOct 22, 2025
Read

MySQL InnoDB Redo Log Tuning: Sizing for Production Write Throughput

The InnoDB redo log default of 100MB is dangerously undersized for production. Learn to measure your write throughput, size innodb_redo_log_capacity correctly, and monitor checkpoint pressure before write stalls occur.

MySQL4 minOct 21, 2025
Read

MySQL 8.4 Audit Log Filter: Selective Logging for Compliance

MySQL 8.4's audit log filter system lets you capture exactly the events your compliance framework requires — filtering by user, schema, event class, and severity to reduce audit log volume.

MySQL8 minOct 13, 2025
Read

MySQL InnoDB Lock Monitoring: Detecting and Killing Blocking Transactions

Monitor InnoDB lock contention with performance_schema.data_locks, find blocking transactions, kill them safely, and prevent escalation with short transactions and proper timeouts.

MySQL5 minSep 12, 2025
Read

MySQL Query Cache Removal: Why It Was Removed and Modern Alternatives

Understand why MySQL removed the query cache in 8.0 and what to use instead: application-level Redis caching, ProxySQL query cache, and pre-computed summary tables.

MySQL1 minAug 20, 2025
Read

InnoDB Buffer Pool Tuning: Sizing, Hit Ratio, and Warm-Up Strategies

Size and tune the MySQL 8.4 InnoDB buffer pool from a complete memory budget, measured I/O and latency, safe resize tests, and restart warm-up behavior.

MySQL5 minAug 4, 2025
Read

Diagnosing and Fixing MySQL Binlog Replication Failures

MySQL replication errors 1062 and 1032 stop your replica SQL thread silently. Learn to diagnose binlog failures, fix data drift with pt-table-sync, and configure GTID-safe replication.

MySQL10 minJul 15, 2025
Read

MySQL JSON Columns: Operators, Generated Column Indexes, and Partial Updates

Use MySQL JSON columns effectively with path operators, functional indexes via generated columns, JSON_CONTAINS filtering, and partial updates with JSON_SET.

MySQL4 minJul 4, 2025
Read

Password Management in MySQL 8: Policies, Reuse, and Dual Passwords

MySQL 8 introduced comprehensive password management — password validation policies, reuse history, expiration, and dual passwords for zero-downtime credential rotation.

MySQL8 minMay 12, 2025
Read

MySQL User Permissions Best Practices: Least Privilege and Password Policy

Harden MySQL user permissions with host-scoped grants, validate_password plugin, account locking, and privilege auditing. Essential for SOC2 and PCI-DSS compliance.

MySQL5 minApr 25, 2025
Read

MySQL Audit Logging: MariaDB Audit Plugin, General Log, and Trigger-Based Auditing

Implement MySQL audit logging for SOC2, PCI-DSS, and HIPAA compliance. Covers MariaDB Audit Plugin, general query log, trigger-based auditing, and SIEM integration.

MySQL7 minApr 16, 2025
Read

MySQL 8.4 Full-Text Search: InnoDB FTS Tuning and Best Practices

MySQL InnoDB full-text search is underused and often misconfigured. With 8.4 LTS, new defaults and tuning opportunities can cut FTS query time by 60% or more.

MySQL8 minApr 8, 2025
Read

MySQL Encryption at Rest and in Transit: InnoDB, TLS, and Binary Log Encryption

Encrypt MySQL data at rest with InnoDB tablespace encryption and in transit with TLS. Covers keyring plugin, require_secure_transport, and binary log encryption.

MySQL1 minApr 7, 2025
Read

MariaDB vs MySQL in 2026: Which Should You Choose?

MariaDB and MySQL have diverged significantly. This guide compares licensing, Galera vs Group Replication, thread pool, cloud support, and migration paths.

MySQL9 minMar 4, 2025
Read

MySQL InnoDB Crash Recovery: Diagnosis and Emergency Procedures

Understand InnoDB crash recovery mechanics and handle edge cases with innodb_force_recovery. Emergency dump procedures and durability settings to prevent future crashes.

MySQL4 minFeb 17, 2025
Read

Diagnosing MySQL Connection Saturation: Too Many Connections Fix

Systematically diagnose and fix MySQL 'Too many connections' errors. Learn to identify connection leaks, tune wait_timeout, and implement ProxySQL pooling.

MySQL1 minFeb 7, 2025
Read

MySQL InnoDB Deadlocks: Diagnosis, Root Causes, and Prevention

Diagnose MySQL 8.4 InnoDB deadlocks from lock evidence, correct ordering and indexing, use SKIP LOCKED only for queues, and retry whole transactions safely.

MySQL6 minJan 10, 2025
Read

MySQL 8.0 Is EOL: Upgrade Checklist for 8.4 LTS (5 Breaking Changes to Fix First)

MySQL 8.0 end-of-life is April 2026. Plan your upgrade to MySQL 8.4 LTS now. Learn migration strategies, new features, and compatibility considerations.

MySQL17 minAug 13, 2024
Read

MySQL Replication Options: Native Replication vs Group Replication vs InnoDB Cluster

MySQL offers multiple replication topologies — traditional async replication, semi-sync, Group Replication, and InnoDB Cluster. Understanding the trade-offs determines whether your failover takes seconds or minutes.

MySQL9 minNov 9, 2023
Read

Securing MySQL Connections with SSL/TLS: A Complete Configuration Guide

MySQL transmits data in plaintext by default, exposing passwords and query results to network interception. Here's how to configure SSL/TLS for MySQL — from certificate generation to enforcing encrypted connections.

MySQL9 minSep 23, 2023
Read

ProxySQL: The Complete Guide to MySQL Load Balancing and Connection Pooling

ProxySQL pools thousands of application connections into a small backend pool, splits reads to replicas automatically, and lets you change routing without touching application code or restarting MySQL.

MySQL10 minMay 9, 2023
Read

MySQL JSON Functions: A Complete Guide to JSON_EXTRACT, JSON_SET, and Multi-Valued Indexes

A complete guide to MySQL JSON functions — JSON column type, JSON_EXTRACT and arrow operators, JSON_SET vs JSON_INSERT vs JSON_REPLACE vs JSON_MERGE_PATCH, functional indexes, and multi-valued indexes for arrays.

MySQL10 minFeb 28, 2023
Read

MySQL Indexes Explained: Complete Data Structure Guide for Query Optimization

Master MySQL index data structures and optimization strategies. Learn B+ tree internals, index selection, covering indexes, and real-world performance case studies.

MySQL20 minJan 17, 2023
Read

MySQL Full-Text Search: FULLTEXT Indexes, MATCH AGAINST, and Boolean Mode

A production guide to MySQL full-text search — FULLTEXT index creation, MATCH AGAINST in natural language and boolean modes, the 50% rule, InnoDB vs MyISAM FTS, combining with B-tree indexes, and comparison against Elasticsearch.

MySQL11 minNov 14, 2022
Read

Troubleshooting MySQL Issues: Daily Queries Every DBA Should Know

Essential MySQL diagnostic queries every DBA needs. Quickly identify slow queries, lock contention, replication lag, memory issues, and connection problems.

MySQL7 minOct 4, 2022
Read

MySQL Replication Filters: Selective Replication for Specific Databases and Tables

MySQL replication filters let you replicate only specific databases or tables — but misconfiguration can silently drop transactions. Here's how to use binlog-do-db, replicate-do-db, and replicate-do-table safely.

MySQL8 minSep 24, 2022
Read

MySQL Replication Lag: Causes, Diagnosis, and Fixes

A comprehensive guide to MySQL replication lag — why it happens, why Seconds_Behind_Master lies, how to measure accurately with pt-heartbeat, and how to fix it with multi-threaded replication and LOGICAL_CLOCK parallelism.

MySQL13 minSep 15, 2022
Read

MySQL Online Schema Change: pt-osc and gh-ost in Production

A production guide to online MySQL schema changes — when to use pt-online-schema-change vs gh-ost vs MySQL 8.0 INSTANT DDL, configuration parameters, the cutover mechanism, and a step-by-step safety playbook.

MySQL12 minAug 23, 2022
Read

MySQL GTID Replication: Complete Setup and Failover Guide

GTIDs eliminate manual binlog position tracking in MySQL replication. This guide covers enabling GTIDs, CHANGE MASTER TO MASTER_AUTO_POSITION, and failover.

MySQL9 minAug 11, 2022
Read

MySQL Connection Lifecycle: Complete Guide to Connection Management and Optimization

Optimize MySQL connection management for maximum throughput. Learn connection pooling with HikariCP, ProxySQL load balancing, and thread pool configuration.

MySQL17 minJul 19, 2022
Read

Online Schema Change for Tables with Triggers: pt-osc and gh-ost Workarounds

Performing online schema changes on MySQL tables with triggers is a known pain point — pt-osc creates conflicting triggers, and gh-ost has its own limitations. Here are the safe approaches.

MySQL10 minJun 14, 2022
Read

Geospatial Data Handling Made Easy with MySQL 8.0

MySQL 8.0 significantly improved geospatial support with SRID-aware columns, spatial reference systems, and accurate geographic distance calculations. Here's how to use it in production.

MySQL9 minMay 4, 2022
Read

MySQL Tablespace Encryption (TDE): Encrypting Data at Rest

MySQL InnoDB tablespace encryption (TDE) encrypts data pages on disk without changing application code — using a two-tier keyring architecture that separates the master key from table keys.

MySQL9 minMar 22, 2022
Read

ProxySQL Read/Write Splitting for MySQL Replication: Complete Setup Guide

ProxySQL's read/write splitting routes SELECT queries to replicas and writes to the primary automatically — but getting the configuration right requires understanding hostgroups, query rules, and lag-aware routing.

MySQL9 minFeb 20, 2022
Read

10 Powerful JSON Functions in MySQL 8 Every Developer Should Know

MySQL 8 dramatically improved JSON support with functions that eliminate the need for application-side parsing. Here are 10 JSON functions that will transform how you work with JSON columns in MySQL.

MySQL9 minJan 2, 2022
Read