4 minute read

MySQL: The World’s Most Popular Open Source Database (2026)

Quick Answer

MySQL remains the world’s most popular open-source database. The 8.4 LTS release offers long-term stability through 2029, while the 9.x Innovation track introduces JavaScript stored procedures and native VECTOR data types. Critical note: Efficient vector search in Community Edition requires Oracle HeatWave cloud; pgvector alternatives exist for self-hosting.

What is MySQL in 2026?

MySQL has bifurcated into two release tracks to serve different enterprise needs:

LTS Track: MySQL 8.4

  • Philosophy: Feature freezing for stability
  • Premier Support: Until April 2029
  • Extended Support: Until April 2032
  • Best For: Production systems requiring predictability

Innovation Track: MySQL 9.x

  • Philosophy: Rapid feature delivery
  • Support Window: ~3 months per version
  • Best For: Development and teams adopting new features
  • Key Features: JavaScript stored procedures, VECTOR type, UUIDv7

Critical Lifecycle Events (2026)

Version Status Deadline
MySQL 5.7 EOL October 2023 (Critical Risk)
MySQL 8.0 EOL April 2026 (End of line imminent)
MySQL 8.4 Current LTS Supported until April 2029
MySQL 9.x Innovation Rolling support window

The 9.x Innovation Era

JavaScript Stored Procedures (MLE)

MySQL 9.1 introduces JavaScript as a first-class stored procedure language:

// JavaScript stored procedure in MySQL 9.1
const ctx = mysql.getContext();

function transferFunds(fromId, toId, amount) {
  try {
    ctx.startTransaction();

    const res1 = ctx.execute(
      "UPDATE accounts SET balance = balance - ? WHERE id = ?",
      [amount, fromId]
    );

    const res2 = ctx.execute(
      "UPDATE accounts SET balance = balance + ? WHERE id = ?",
      [amount, toId]
    );

    ctx.commit();
    return { success: true };
  } catch (err) {
    ctx.rollback();
    throw err;
  }
}

Features:

  • ECMAScript 2023 compliance (arrow functions, const/let)
  • Sandboxed execution (no filesystem or network access)
  • Bidirectional type marshaling between MySQL and JavaScript

Native VECTOR Data Type

MySQL 9.0 introduces vectors for AI workloads:

Specification Value
Type VECTOR(n) - fixed-size float32 array
Default dimensions 2048
Max dimensions 16,383
Conversion STRING_TO_VECTOR(), VECTOR_TO_STRING()

Critical Limitation: Community Edition lacks native indexing. The DISTANCE() function requires Oracle HeatWave.

MySQL Cloud Implementations

OCI HeatWave (Oracle Cloud)

The Complete AI Package:

  • Vector Store: HNSW indexing with quantization
  • HeatWave Load: Zero-ETL document ingestion
  • Hybrid Search: Semantic + keyword combined
  • Pricing: Free tier (50GB) with limitations

Advantages:

  • 1400x faster than Aurora for analytics (Oracle claims)
  • In-memory columnar storage for OLAP
  • Integrated vector generation and search

AWS Aurora Serverless v2

Cloud-Native Architecture:

  • Log-structured storage (6x replication across 3 AZs)
  • Serverless scaling with ACUs (0.5 to 128 ACU)
  • No scale-to-zero (minimum ~$40/month)

Limitations:

  • No native vector indexing
  • Requires external vector DB (Pinecone) or pgvector via Aurora PostgreSQL

Google Cloud SQL

ScaNN Integration:

  • Native ScaNN algorithm for vector search
  • Manual memory tuning (cloudsql_vector_max_mem_size)
  • No cost-effective auto-scaling like Aurora

Key Features

Storage Engine: InnoDB

InnoDB is the default and recommended engine:

Feature Description
Clustered Index Primary key determines physical storage order
MVCC Multi-Version Concurrency for non-locking reads
Buffer Pool Dynamic resizing without restart
Doublewrite Buffer Prevents partial page writes

High Availability

Group Replication:

  • Paxos-based consensus for zero-data-loss RPO
  • Automatic primary election on failure
  • Single-primary mode by default

InnoDB Cluster:

  • Automatic routing via MySQL Router
  • Read-write splitting (writes to primary, reads from replicas)

Vector Search Divergence

Platform Vector Support Implementation
OCI HeatWave Native HNSW Distributed in-memory index
Google Cloud SQL Native ScaNN Integrated algorithm
AWS Aurora None Use separate vector DB
Community Edition Storage only Use pgvector extension

MySQL vs PostgreSQL

Feature MySQL PostgreSQL
Default Engine InnoDB (clustered index) Heap storage (indexes separate)
JSON Support Built-in functions JSONB with GIN indexes
Vector Search HeatWave-only (paid) pgvector (free everywhere)
Full-Text Search Built-in FTS Built-in FTS
Procedural Logic JavaScript (9.x), SQL/PSM PL/pgSQL, Python, Perl, Tcl
Replication Statement/Row-based binlog Logical replication with WAL

MySQL vs MariaDB

Feature MySQL MariaDB
Governance Oracle Corporation Community (MariaDB Foundation)
Vector Search Planned (HeatWave) Native in MariaDB 11.7
Storage Engines InnoDB, MyISAM, Memory More engines (ColumnStore, Spider)
Thread Pool Enterprise only Built-in community edition

ORM Support

Prisma

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

Drizzle ORM

import { mysqlTable, serial, varchar } from 'drizzle-orm/mysql-core';

export const users = mysqlTable('users', {
  id: serial('id').primaryKey(),
  name: varchar('name', { length: 255 }),
});

TypeORM

@Entity()
export class User {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;
}

Use Cases: Best For

  • Web Applications: Proven reliability for LAMP stack applications
  • E-commerce: ACID transactions for order processing
  • SaaS Platforms: Familiar skillset, broad hosting support
  • Legacy Migrations: Direct upgrade path from MySQL 5.x/8.0
  • AI Applications: When using OCI HeatWave for integrated vector search

Use Cases: Avoid For

  • Vector Search (Self-Hosted): Community Edition lacks indexing; use PostgreSQL + pgvector instead
  • Complex Analytics: HeatWave adds cost; consider dedicated OLAP warehouses
  • Multi-Region Active-Active: Requires complex manual setup; CockroachDB offers this natively

MySQL Connector Guide

Language Recommended Driver Notes
Node.js mysql2 Industry standard, prepared statements
Python mysqlclient Native driver, asyncpg alternative exists
Java Connector/J Standard JDBC driver
Go go-sql-driver/mysql Database/sql interface
PHP pdo_mysql Standard PDO interface

FAQ

Is MySQL 8.0 still supported?

MySQL 8.0 Premier Support ends in April 2026. Upgrade to MySQL 8.4 LTS immediately for continued security patches.

Native vector indexing requires Oracle HeatWave cloud service. Community Edition can store vectors but lacks efficient search capabilities.

Can I use MySQL in serverless?

MySQL requires connection pooling for serverless. Consider Cloudflare Hyperdrive, Neon (Postgres), or Turso (SQLite) for true serverless economics.

What is the difference between MySQL 8.4 and 9.x?

MySQL 8.4 is an LTS release with long-term support through 2029. MySQL 9.x is the Innovation track with new features like JavaScript stored procedures and VECTOR type, but short support windows.

Is MySQL free?

The Community Edition is free under GPL v2. Enterprise features (Thread Pool, Enterprise Security) require commercial licenses from Oracle.


Related Technologies: PostgreSQL, MariaDB, Neon, PlanetScale, CockroachDB, Drizzle ORM, Prisma

Updated: