MySQL
The long-standing open-source SQL database behind much of the web, built on the InnoDB engine.
- What it is
- Relational databases
- Type
- Open source
- Made by
- Oracle
- License
- GPLv2 or commercial
- Facts checked
- 5 October 2026
What it is
MySQL is a client-server SQL database whose storage is handled by a pluggable engine; the default, and the one almost everyone uses, is InnoDB. InnoDB stores each table as a clustered index on its primary key, so rows sit in key order and a primary-key lookup goes straight to the data. It gives ACID transactions with row-level locking, and consistent reads through MVCC, so readers don’t wait for writers.
Replication is MySQL’s classic scaling tool. The primary records every change in its binary log, and replicas copy and replay it, which spreads read traffic across machines. Replication is asynchronous by default; semisynchronous mode makes a commit wait until at least one replica has the change, and GTIDs let replicas track position without log file offsets. Oracle ships two tracks: LTS series (8.4 and 9.7) that get only fixes for years, and Innovation releases with new features, each supported only until the next.
Why teams pick it
- Mature, widely known, and offered as a managed service on every major cloud
- Simple, well-understood replication for read scaling and failover
- Primary-key lookups are fast because InnoDB stores rows in key order
- LTS series change little, which keeps upgrades predictable
Watch out for
- With default asynchronous replication, a failover can lose the last commits that hadn’t reached a replica
- Random primary keys such as UUIDv4 scatter inserts across the clustered index, which can leave its pages only half full
- Innovation releases are supported only until the next one, so production usually stays on LTS
- GPLv2: distributing it inside closed-source software needs a commercial licence from Oracle
- Data model
- Relational tables; InnoDB stores rows in primary-key order
- Query language
- SQL (MySQL dialect)
- Client protocol
- MySQL protocol
- Transactions
- ACID with row-level locking (InnoDB)
- Default isolation
- Repeatable read (InnoDB)
- Consistency
- MVCC consistent reads on the primary; replicas asynchronous by default
- How it scales
- One primary for writes; replicas spread reads
- Replication
- Binary log to replicas: asynchronous by default, semisynchronous optional, GTIDs
- Storage engine
- InnoDB (pluggable engines)
- Ways to run it
- Self-hosted; Amazon RDS, Google Cloud SQL, Azure Database for MySQL
The MySQL family
1 technologies built from or on MySQL
Alternatives
What all relational databases have in common →Compare side by side →
DoltOpen sourceA MySQL-compatible SQL database with Git’s model built in: every table can be branched, diffed, merged, pushed and pulled, and every commit keeps the whole database as it was.How it fits with other technologies
What uses MySQL
- Active Record (Ruby on Rails)reads and writes model rows inMySQL
- entgenerates typed queries forMySQL
- Entity Framework Corequeries through a third-party providerMySQL
- Hibernate ORMgenerates SQL and maps rows fromMySQL
- Prisma ORMgenerates queries and migrations forMySQL
- SQLAlchemygenerates SQL through a dialect forMySQL
- Tortoise ORMconnects with asyncmy or aiomysql toMySQL
- Drizzle ORMbuilds typed SQL forMySQL
- jOOQgenerates classes from and queriesMySQL
- Dapperruns hand-written SQL againstMySQL
- OpenStackkeeps each service’s state inMySQL
- Cloud Foundrykeeps Diego’s scheduling state inMySQL
- FlashPanelsets up and manages databases inMySQL
- K3scan keep cluster state, via kine, inMySQL
- RisingWavereads row changes directly (CDC) fromMySQL
- Temporalcan keep workflow state and history inMySQL
- Baculacan keep its catalog inMySQL
- Plakarbacks up, through an integration,MySQL
- WAL-Gbacks up, with xtrabackup and binlogs,MySQL
- Alibaba Cloud PolarDBspeaks the protocol and SQL ofMySQL
- Doltspeaks the wire protocol ofMySQL
- Percona Operatorsdeploy Percona’s builds ofMySQL
- PlanetScaleruns sharded Vitess clusters ofMySQL
- TiDBspeaks the wire protocol ofMySQL
- Vitessshards and routes queries acrossMySQL
- RocksDBis a storage engine, via MyRocks, forMySQL
- Valkeycaches query results in front ofMySQL
- Hyperdrivepools connections and caches reads forMySQL
- Readysetcaches queries, reading the binlog, forMySQL
- Atlasplans and applies schema changes toMySQL
- ChartDBdraws diagrams of schemas inMySQL
- DB Pilotbrowses and queriesMySQL
- dbdiagram.ioreads schemas from and writes DDL forMySQL
- DBSnappersnapshots and restores, with mysqldump,MySQL
- DbVisualizerbrowses, queries and editsMySQL
- Apache Paimoncan sync tables and schema changes fromMySQL
- Project Nessiecan keep commits (experimental) inMySQL
- Apache Zeppelinqueries, via its JDBC interpreter,MySQL
- Hotdataingests tables fromMySQL
- MindsDBspeaks the wire protocol ofMySQL
- Presto (PrestoDB)can query and join live data inMySQL
- Spice.ai OSSfederates and replicates, via CDC, fromMySQL
- Apache Dorisspeaks the wire protocol of, and syncs fromMySQL
- Apache Druidcan keep cluster metadata inMySQL
- Tinybirdcan copy tables, via a table function, fromMySQL
- Apache NiFicaptures binlog changes (CDC) fromMySQL
- Artiereads the binlog ofMySQL
- Estuarycaptures binlog changes fromMySQL
- OLakereads the binlog ofMySQL
- Debeziumreads the binlog ofMySQL
- PRQLcompiles queries to SQL forMySQL
- Apache Supersetkeeps its metadata in, or queries,MySQL
- Forgejocan keep its database inMySQL
- Giteacan keep its database inMySQL
- Grafanacan query or store its dashboards inMySQL
- Uptime Kumacan store its data in MariaDB, a fork ofMySQL
- Chaos Monkeykeeps its schedule and history inMySQL
- Toxiproxysits in front of in testsMySQL
- Janssenstores its configuration and users inMySQL
- HashiCorp Vaultcreates short-lived database users inMySQL
Point a replica at its source using GTID auto-positioning · sql
-- my.cnf on both servers: gtid_mode=ON, enforce_gtid_consistency=ON
-- on the source
CREATE USER 'repl'@'10.0.%' IDENTIFIED BY 'change-me';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'10.0.%';
-- on the replica
CHANGE REPLICATION SOURCE TO
SOURCE_HOST = 'db-primary.internal',
SOURCE_USER = 'repl',
SOURCE_PASSWORD = 'change-me',
SOURCE_AUTO_POSITION = 1,
SOURCE_SSL = 1;
START REPLICA;See it in a real stack
No architecture uses MySQL yet. Drop it into the playground and wire it up yourself.Open playground →Benchmarks
Where it came from1995–2026
Michael “Monty” Widenius and David Axmark wanted a SQL interface on top of their own fast, low-level ISAM table routines. They tried mSQL, a small database of the time, but found it neither fast enough nor flexible enough. So they wrote their own SQL layer, keeping almost the same API as mSQL so that code written for it could be ported easily. MySQL, named after Widenius’s daughter My, counts May 23, 1995 as its birthday, and with Allan Larsson they founded MySQL AB in Sweden to develop it.
MySQL AB released it under the GPL and sold commercial licences to companies that didn’t want the GPL’s terms. Fast, simple and free, it became the M in the LAMP stack (Linux, Apache, MySQL and PHP, Perl or Python), and by the end of 2004 the company claimed more than 5 million active installations. Its default engine, MyISAM, had no transactions; users who needed them could choose InnoDB, a transactional engine from the Finnish company Innobase.
Then ownership moved fast. Oracle bought Innobase in October 2005, Sun Microsystems agreed in January 2008 to buy MySQL AB for about $1 billion, and Oracle completed its purchase of Sun in January 2010. Worried about Oracle’s stewardship, Widenius forked MySQL as MariaDB, named after his second daughter, Maria. Oracle still develops MySQL today.
Why it’s built this way
- Speed and simplicity before completeness
- MySQL began as a quick SQL front end for fast ISAM routines. Its early default engine, MyISAM, skipped transactions, so full ACID guarantees had to come from another engine.
- An API that mirrored mSQL
- Third-party code written for mSQL could be ported to MySQL easily.
- Pluggable storage engines
- The SQL layer is separate from how tables are stored, so a third party’s transactional engine, InnoDB, could slot in. It became the default in MySQL 5.5 in 2010.
- GPL for everyone, a paid licence for the rest
- Dual licensing kept MySQL free under the GPL, while companies shipping it inside closed products bought commercial licences, one of MySQL AB’s three main sources of revenue.
Timeline
- 1995
MySQL’s official birthday, May 23
- 2005
Oracle buys Innobase, maker of the InnoDB engine
- 2008
Sun Microsystems buys MySQL AB for about $1 billion
- 2009
Widenius forks MySQL as MariaDB after Oracle announces it will buy Sun
- 2010
Oracle completes the Sun deal; InnoDB becomes the default engine in 5.5
- 2026
MySQL 9.7 LTS moves several Enterprise-only features into Community Edition
- MySQL 8.4 manual: History of MySQL
- Oracle MySQL blog: 1995–2025, 30 years! (Feb 2025) · archived copy, original
- MySQL AB: About MySQL AB (founders, LAMP, installations, revenue model; Jan 2005) · archived copy, original
- Oracle: MySQL commercial license for OEMs, ISVs and VARs (GPLv2 or commercial)
- MySQL 8.4 manual: The MyISAM storage engine (no transactions) · archived copy, original
- MySQL 8.4 manual: Pluggable storage engine architecture · archived copy, original
- Oracle press release: Oracle acquires Innobase (Oct 2005) · archived copy, original
- Sun press release: Sun to acquire MySQL for about $1 billion (Jan 2008) · archived copy, original
- Oracle press release: Oracle buys Sun (Apr 2009)
- Oracle press release: Oracle completes acquisition of Sun (Jan 2010) · archived copy, original
- MySQL 5.5.5 release notes: InnoDB becomes the default storage engine (Jul 2010) · archived copy, original
- MariaDB Foundation: MariaDB Server (history and naming)
- MySQL 9.7.0 release notes: Enterprise components move to Community Edition (Apr 2026)
Sources13 · facts checked 5 October 2026
- MySQL 9.7 manual: MySQL releases, LTS and Innovation
- MySQL 8.4 manual: Introduction to InnoDB
- MySQL 8.4 manual: InnoDB transaction isolation levels (REPEATABLE READ default)
- MySQL 8.4 manual: The physical structure of an InnoDB index
- MySQL 8.4 manual: Replication
- MySQL 8.4 manual: Semisynchronous replication
- MySQL 8.4 manual: GTID auto-positioning
- MySQL 8.4 manual: Setting up replication using GTIDs
- MySQL 8.4 manual: Creating a user for replication
- MySQL commercial license for OEMs, ISVs and VARs
- Amazon RDS for MySQL
- Google Cloud SQL for MySQL
- Azure Database for MySQL overview