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)
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:
| |
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
Notable Uses & Legacy
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
Influenced
Running Today
Run examples using the official Docker image:
docker pull mysql:9.7Example usage:
docker run --name mysql -e MYSQL_ROOT_PASSWORD=secret -d mysql:9.7