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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.