Est. 1995 Intermediate

MySQL

The open-source relational database that put the 'M' in the LAMP stack — a fast, approachable SQL system created in Sweden in 1995 that became the default database of the early web and still backs many of the world's largest sites.

Created by Michael Widenius, David Axmark, and Allan Larsson (MySQL AB)

Paradigm Declarative, set-oriented query language (SQL) over a relational database engine, with a procedural extension for stored routines
Typing Static, strong — values conform to declared column data types in a fixed schema
First Appeared 1995
Latest Version MySQL 9.7 LTS (April 2026)

MySQL is one of the world’s most widely deployed open-source relational database management systems. It stores data in tables defined by a fixed schema and is queried using SQL (Structured Query Language), the declarative standard for relational databases. Created in Sweden in the mid-1990s and released under an open-source license, MySQL became the database half of the LAMP stack — Linux, Apache, MySQL, and PHP/Perl/Python — the combination of free software that powered the first great wave of dynamic, database-backed websites.

Strictly speaking, the language a developer writes against MySQL is SQL: a declarative, set-oriented language in which you describe what data you want (SELECT name FROM users WHERE active = 1) rather than how to retrieve it. MySQL implements its own dialect of SQL, layering on a procedural sub-language for stored procedures, functions, and triggers, plus many vendor-specific extensions. What made MySQL historically distinctive was less the language than the engine behind it: from the start it prized speed, simplicity, and ease of installation over the exhaustive feature checklist of established commercial databases.

History and Origins

MySQL’s roots are in the practical needs of a small Swedish consulting company. In 1994, Michael “Monty” Widenius and David Axmark, working at TcX DataKonsult, needed a fast database to drive their own data-warehousing applications. They had been using mSQL (mini SQL), but found it too slow and limited for their tables. Rather than adopt it wholesale, Widenius wrote his own fast, low-level storage routines and wrapped them in a SQL interface whose API deliberately resembled mSQL’s — so existing tools could be ported easily.

The first internal release came on 23 May 1995. The name “MySQL” combines “My” — the name of Widenius’s daughter — with “SQL.” (The dolphin in the logo, named Sakila, came later.) That same year, Widenius, Axmark, and Allan Larsson founded MySQL AB to develop and commercialize the database.

The decision that defined MySQL’s trajectory was making it open source. Through the late 1990s and especially after the move to the GNU General Public License in 2000, MySQL adopted a dual-licensing model: the software was free under the GPL for open-source use, while a paid commercial license was available for vendors who wanted to embed it in closed-source products. This model funded the company while letting MySQL spread freely — and spread it did, becoming the de facto database for the booming web.

Design Philosophy

MySQL’s early philosophy was a deliberate trade-off: be fast, simple, and good enough rather than complete. In an era when industrial databases like Oracle and DB2 were expensive, heavyweight, and complex to administer, MySQL was free, installed in minutes, and ran well on commodity hardware. For the read-heavy workloads of typical websites, that was often exactly the right balance.

A defining architectural choice is MySQL’s pluggable storage engine model. The SQL layer — parsing, optimization, connection handling — is separated from the engine that actually stores and retrieves rows on disk. This let MySQL offer several engines with different trade-offs:

  • MyISAM — the original default: fast for reads, with table-level locking and no transactions. It powered the early web’s mostly-read traffic.
  • InnoDB — transactional and crash-safe, with row-level locking, ACID guarantees, and foreign-key support. Originally a third-party engine from Innobase OY.

For years, choosing between MyISAM (speed, simplicity) and InnoDB (safety, transactions) was a core MySQL decision. As applications demanded reliability, InnoDB won out, and MySQL 5.5 (2010) made it the default — a quiet but pivotal maturation of the system.

Key Features

  • SQL with extensions — a broad implementation of relational SQL plus MySQL-specific syntax (LIMIT, INSERT ... ON DUPLICATE KEY UPDATE, AUTO_INCREMENT, and more).
  • Pluggable storage engines — InnoDB by default, with others (MyISAM, MEMORY, ARCHIVE, CSV) for specialized needs.
  • Replication — built-in primary/replica replication, a cornerstone of MySQL’s ability to scale reads and provide high availability; later extended with group replication and InnoDB Cluster.
  • Transactions and ACID — full transactional integrity via InnoDB, including row-level locking and multi-version concurrency control (MVCC).
  • Stored routines and triggers — procedural stored procedures, functions, and triggers added in 5.0.
  • JSON support — a native JSON data type since 5.7, allowing document-style data alongside relational tables.
  • Window functions and CTEs — analytic SQL added in 8.0, closing a long-standing gap with other databases.

A simple session illustrates the declarative core:

1
2
3
4
5
6
7
8
9
CREATE TABLE users (
  id        INT AUTO_INCREMENT PRIMARY KEY,
  name      VARCHAR(100) NOT NULL,
  active    BOOLEAN DEFAULT TRUE
);

INSERT INTO users (name) VALUES ('Ada'), ('Linus');

SELECT name FROM users WHERE active = TRUE ORDER BY name;

Evolution

MySQL’s feature set grew steadily from a lean engine into a capable general-purpose database. Version 3.23 (2001) added full-text search and bundled the transactional engines. 4.0 and 4.1 (2003–2004) brought UNION, subqueries, prepared statements, and Unicode. 5.0 (2005) was a landmark, adding stored procedures, triggers, views, and cursors — features that let MySQL compete for more serious enterprise work.

The corporate history then took center stage. Sun Microsystems acquired MySQL AB in 2008 for roughly US$1 billion. When Oracle moved to acquire Sun (completed 27 January 2010), many in the community worried that Oracle — owner of a rival flagship database — might neglect or constrain MySQL. In response, Monty Widenius forked the code to create MariaDB in 2009, a GPL-only, community-governed drop-in alternative. MariaDB has since diverged in places but remains broadly compatible, and many Linux distributions ship it in MySQL’s place.

Under Oracle, MySQL development continued. 5.6 (2013) and 5.7 (2015) brought optimizer improvements, online schema changes, and the native JSON type. 8.0 (2018) was a major modernization — window functions, common table expressions, a transactional data dictionary, atomic DDL, and utf8mb4 Unicode by default. In 2023, Oracle restructured releases into rapid Innovation versions and stabilized LTS series; 8.4 LTS followed, and MySQL 9.7 LTS arrived on 21 April 2026, making the Hypergraph optimizer available in the Community Edition and adding further security features such as dynamic data masking and OpenID authentication.

Current Relevance

Decades on, MySQL remains one of the most popular databases in the world and a default choice for new web applications, especially in the PHP ecosystem where WordPress, Drupal, and countless frameworks assume it. It is offered as a managed service by every major cloud — Amazon RDS and Aurora, Google Cloud SQL, Azure Database for MySQL, and Oracle’s own MySQL HeatWave, which couples the database with an in-memory analytics and machine-learning engine.

The landscape is more competitive than it was at MySQL’s peak. PostgreSQL has gained ground as a feature-rich open-source alternative, and MariaDB continues as a parallel fork with an active community. Even so, MySQL’s installed base is vast, its tooling mature, and its compatibility ecosystem — drivers, ORMs, hosting, and sharding layers like Vitess — deep and well supported.

Why It Matters

MySQL’s importance to programming history is hard to overstate. By being fast, free, and easy, it democratized the relational database: a teenager with a Linux box could run the same kind of system that previously required an enterprise budget. As the “M” in LAMP, it was infrastructure for the explosion of dynamic websites in the late 1990s and 2000s, from personal blogs to the early versions of some of the largest sites ever built.

MySQL also became a defining case study in open-source business and governance — the dual-licensing model that funded its development, the billion-dollar acquisitions that followed, and the MariaDB fork that showed how a community can preserve a project’s freedom when ownership changes hands. For millions of developers, MySQL was the database where they first learned SQL, normalized a schema, and watched a SELECT return rows — and for a great many production systems, it still is.

Timeline

1994
Michael 'Monty' Widenius and David Axmark begin development at the Swedish consulting firm TcX DataKonsult. Needing a fast database for their own data-warehousing work, they build a SQL layer modeled on the API of the existing mSQL engine but backed by Widenius's own faster, lower-level storage routines.
1995
The first internal release of MySQL is made on 23 May 1995. The name combines 'My' — the name of Widenius's daughter — with 'SQL'. MySQL AB is founded in Sweden by Widenius, Axmark, and Allan Larsson to develop and promote the database.
2000
MySQL is released under the GNU General Public License, adopting the dual-licensing model (free GPL software plus a paid commercial license) that funds MySQL AB and helps drive the explosive growth of the LAMP stack — Linux, Apache, MySQL, and PHP/Perl/Python.
2001
Version 3.23 reaches general availability, adding full-text indexing and bundling the transactional InnoDB and BerkeleyDB storage engines as alternatives to the default non-transactional MyISAM engine.
2003
MySQL 4.0 becomes generally available, introducing UNION queries and the query cache; version 4.1 follows in 2004 with subqueries, prepared statements, and Unicode support.
2005
MySQL 5.0 reaches general availability, adding stored procedures, triggers, views, and cursors — features that brought MySQL closer to traditional enterprise databases. The same year, Oracle acquires Innobase OY, the Finnish company behind the InnoDB storage engine.
2008
Sun Microsystems acquires MySQL AB for approximately US$1 billion, bringing the open-source database into a large commercial vendor.
2009
Anticipating Oracle's acquisition of Sun, Monty Widenius forks the codebase to create MariaDB, a community-driven, GPL-only drop-in alternative intended to keep the database free of single-vendor control.
2010
Oracle Corporation completes its acquisition of Sun Microsystems on 27 January 2010, taking over stewardship of MySQL. Later that year MySQL 5.5 is released, making the transactional, crash-safe InnoDB the default storage engine in place of MyISAM.
2015
MySQL 5.7 reaches general availability, with a native JSON data type (introduced in 5.7.8), a rebuilt optimizer, and generated columns — bringing document-style flexibility to the relational engine.
2018
MySQL 8.0 is released, adding SQL window functions, common table expressions (CTEs), atomic data-definition statements, a transactional data dictionary, and utf8mb4 as the default character set. Version numbers 6.x and 7.x were skipped.
2023
Oracle introduces a new release model splitting development into frequent Innovation releases and stabilized Long-Term Support (LTS) series, replacing the long-lived 8.0 maintenance track.
2026
MySQL 9.7 LTS becomes generally available on 21 April 2026 — the first new LTS series since 8.4 — bringing the Hypergraph query optimizer to the Community Edition, improvements to the MySQL REST Service, dynamic data masking, and OpenID-based authentication, and moving several other previously Enterprise-only components into the Community Edition.

Notable Uses & Legacy

Facebook

Facebook ran one of the world's largest MySQL deployments to store social-graph and user data, maintaining a heavily customized branch of the database and contributing engineering work back to the ecosystem.

YouTube

YouTube built its early data storage on MySQL and later developed Vitess, an open-source sharding and clustering layer for scaling MySQL horizontally across many servers, since adopted widely as a cloud-native database technology.

Wikipedia / MediaWiki

MediaWiki, the software behind Wikipedia and its sister projects, uses MySQL (or its MariaDB fork) as its primary backing store for article content, revisions, and metadata.

WordPress

WordPress, which powers a large share of the world's websites, requires MySQL or MariaDB to store posts, pages, users, and settings — making MySQL a foundation of much of the open web.

Booking.com

Booking.com has been a long-standing large-scale MySQL user, running extensive replicated database fleets to serve travel and reservation traffic.

Cloud database services

Major clouds offer managed MySQL: Amazon RDS and Aurora, Google Cloud SQL, Azure Database for MySQL, and Oracle's own MySQL HeatWave all provide MySQL-compatible services at scale.

Language Influence

Influenced By

SQL mSQL

Influenced

MariaDB Percona Server Drizzle

Running Today

Run examples using the official Docker image:

docker pull mysql:9.7

Example usage:

docker run --name mysql -e MYSQL_ROOT_PASSWORD=secret -d mysql:9.7
Last updated: