Jump to content

MySQL

From Alfawiki
MySQL
Company typeSubsidiary
IndustrySoftware
PredecessorMySQL AB
FoundedMay 23, 1995; 31 years ago (1995-05-23) in Sweden
FounderMichael Widenius, David Axmark, Allan Larsson
FateAcquired by Sun Microsystems (2008), then Oracle Corporation (2010)
Headquarters
United States
Area served
Worldwide
ProductsRelational database management system software
OwnerOracle Corporation
ParentOracle Corporation

MySQL () is an open-source relational database management system (RDBMS). Its name derives from "My," honoring co-founder Michael Widenius's daughter, combined with "SQL," the abbreviation for Structured Query Language. A relational database arranges information into tables with defined relationships, while SQL serves to create, alter, and retrieve data within these databases. MySQL operates in conjunction with operating systems to handle storage management, user permissions, network interfaces, and database consistency.

Offered under both the GNU General Public License and commercial licenses, MySQL was initially created by the Swedish enterprise MySQL AB. This company was later acquired by Sun Microsystems, which itself was purchased by Oracle Corporation. After Oracle's takeover in 2010, Widenius initiated a fork of MySQL called MariaDB.

MySQL is commonly deployed as part of software suites, notably as a fundamental element of the LAMP stack (Linux, Apache, MySQL, Perl/PHP/Python). It supports a wide range of web platforms including Drupal, Joomla, phpBB, and WordPress. Prominent sites such as Facebook, Flickr, MediaWiki, Twitter, and YouTube utilize MySQL for their database management needs.

Overview

Developed primarily in C and C++, MySQL’s SQL parser is built using yacc alongside a proprietary lexical analyzer. It is compatible with a variety of operating systems such as AIX, FreeBSD, HP-UX, IBM i, Linux, macOS, Microsoft Windows, and Oracle Solaris, among others. Additionally, a port exists for OpenVMS.

The distribution model for the MySQL server and client libraries follows a dual-license scheme: the open-source GNU General Public License version 2 and a commercial license. This approach facilitates widespread usage while providing options for enterprises requiring proprietary licensing.

Users can access support through official documentation, free community forums, IRC channels, and Oracle’s commercial MySQL Enterprise support offerings, which vary in terms of service levels and pricing. Numerous third-party providers also offer professional assistance.

MySQL has garnered favorable reviews within the industry for its reliability, high performance, and developer-friendly design. It is recognized as a fast, stable, multi-user, multi-threaded SQL database server well-suited for a broad spectrum of business applications.

History

The origins of MySQL trace back to Swedish firm MySQL AB, founded by Swedes David Axmark and Allan Larsson together with Finnish developer Michael "Monty" Widenius. Development commenced in 1994, culminating in the initial release on 23 May 1995. The project aimed to offer a faster and more adaptable alternative to mSQL, maintaining compatibility by preserving the same API.

Milestones

Significant milestones in MySQL’s development include:

  • Initial launch: 23 May 1995
  • Versions 3.19 (late 1996) and 3.20 (January 1997)
  • Windows edition released on 8 January 1998 supporting Windows 95 and NT
  • Versions 3.21 (1998), 3.22 alpha/beta (1998), and 3.23 beta (June 2000), with production release in January 2001
  • Version 4.0 beta (August 2002) followed by production release (March 2003), introducing SQL unions
  • Version 4.1 beta (June 2004) and production (October 2004), adding R-tree/B-tree indexes, subqueries, and prepared statements
  • Version 5.0 beta (March 2005) with production release in October 2005 featuring cursors, stored procedures, triggers, views, XA transactions
    • Included Federated Storage Engine as default despite known proof-of-concept limitations
  • Acquisition of MySQL AB by Sun Microsystems in 2008
  • Version 5.1 released November 2008 introducing event scheduler, partitioning capabilities, plugin API, and row-based replication
    • Early versions encountered stability issues resolved by version 5.1.51
    • Versions 5.1 and early 6.0 faced performance limitations for data warehousing due to restricted multi-core query processing
  • Oracle’s acquisition of Sun Microsystems in January 2010
  • Post-acquisition fork by Widenius leading to MariaDB development involving many original contributors
  • MySQL Server 5.5 (2010) designated InnoDB as the default storage engine supporting transactions and referential integrity; enhancements included improved I/O subsystem, better SMP support, semisynchronous replication, SQL-standard SIGNAL/RESIGNAL statements, expanded Unicode support including utf8mb4 encoding, and user-configurable partitioning
  • MySQL Server 6.0.11-alpha (May 2009) marked termination of the 6.0 branch; its features were merged into subsequent releases under a revised release strategy
  • General availability of MySQL 5.6 (February 2013) brought improvements to query optimizer efficiency, transactional throughput in InnoDB engine; added NoSQL-style memcached APIs; enhanced partitioning for large datasets; millisecond-precision TIMESTAMP data type; replication enhancements; extended PERFORMANCE_SCHEMA monitoring; full-text search support within InnoDB
  • Release of MySQL 5.7 (October 2015) introduced native JSON data type compliant with RFC 7159 standard
  • Launch of MySQL Server 8.0 (April 2018 GA) unveiled NoSQL Document Store features, atomic crash-safe DDL operations; expanded JSON syntax with new functions including JSON table functions; improved sorting algorithms; partial updates; milestone announced September 2016
  • In 2019, MySQL was honored as DBMS of the Year by DB-Engines ranking

Release history

Version Release date Most recent minor update Latest release date Support termination
Template:Version 14 November 2008; 17 years ago (2008-11-14) 5.1.73 2013-12-03 Dec 2013
Template:Version 3 December 2010; 15 years ago (2010-12-03) 5.5.62 2018-10-22 Dec 2018
Template:Version 5 February 2013; 13 years ago (2013-02-05) 5.6.51 2021-01-20 Feb 2021
Template:Version 21 October 2015; 11 years ago (2015-10-21) 5.7.44 2023-10-25 Oct 2023
Template:Version 19 April 2018; 8 years ago (2018-04-19) 8.0.42 2025-04-15 Apr 2026
Template:Version 18 July 2023; 3 years ago (2023-07-18) 8.1.0 2023-07-18 Oct 2023
Template:Version 25 October 2023; 3 years ago (2023-10-25) 8.2.0 2023-10-25 Jan 2024
Template:Version 16 January 2024; 2 years ago (2024-01-16) 8.3.0 2024-01-16 Apr 2024
Template:Version 30 April 2024; 2 years ago (2024-04-30) 8.4.5 2025-04-15 Apr 2032
Template:Version 1 July 2024; 2 years ago (2024-07-01) 9.0.1 2024-07-23 Oct 2024

Development on version 6 was discontinued following Sun Microsystems’ acquisition, with the MySQL Cluster product line moving forward under version 7. Subsequently, the major release number jumped directly to version 8, signifying strategic product evolution focused on innovation and sustained market relevance.

Legal disputes and acquisitions

On June 15, 2001, NuSphere filed a lawsuit against MySQL AB, TcX DataKonsult AB, and founders Michael ("Monty") Widenius and David Axmark in the U.S. District Court, alleging breach of contract, tortious interference, and unfair competition.

In response during 2002, MySQL AB initiated a counterclaim against Progress NuSphere for copyright and trademark violations, accusing NuSphere of linking MySQL’s GPL-licensed code with its proprietary Gemini table without proper compliance. The matter was resolved through settlement after a preliminary hearing, while the Free Software Foundation confirmed the enforceability of the GNU GPL license.

October 2005 saw Oracle acquire Innobase OY, a Finnish company responsible for developing the InnoDB storage engine integral to MySQL’s transactional features. Oracle highlighted that licensing agreements with MySQL AB were due for renewal in 2006, which MySQL AB later extended for multiple years in April of that year.

In February 2006, Oracle also purchased Sleepycat Software, creator of Berkeley DB—a storage engine with minimal adoption in MySQL that was subsequently removed starting with MySQL version 5.1.12.

Sun Microsystems acquired MySQL AB in January 2008 for $1 billion. Following this, Oracle announced its intention to acquire Sun Microsystems in April 2009, thereby obtaining ownership of MySQL’s copyrights and trademarks. The acquisition received approval from Sun's board, shareholders, U.S. regulatory authorities, and was finalized in August 2009. Oracle committed to continuing development of MySQL consistent with its prior four years of investment.

After the acquisition announcement, Monty Widenius initiated a "Save MySQL" campaign opposing Oracle’s takeover, gathering over fifty thousand signatures petitioning the European Commission to block the transaction. Meanwhile, some figures within the open source community advocated for unconditional approval of the deal. Oracle pledged to maintain MySQL’s dual-license model at least through 2015 amid European Union antitrust investigations. Ultimately, the European Commission granted unconditional approval on January 21, 2010.

Prior to Oracle's acquisition completion in January 2010, Widenius launched MariaDB—a fork licensed solely under the GPL—based on MySQL server version 5.5 codebase that aims to remain compatible as a drop-in replacement for Oracle's MySQL releases.

Features

MySQL is offered in two main versions: the Community Server, which is open source, and the proprietary Enterprise Server. While the Enterprise edition incorporates exclusive server plugin extensions, both editions share a common codebase and versioning system.

Notable capabilities introduced in MySQL 5.6 include:

  • Extensive adherence to ANSI SQL 99 standards and additional enhancements
  • Compatibility across various operating systems
  • Support for Stored procedures written in a procedural language consistent with SQL/PSM
  • Availability of Triggers, Cursors, and modifiable views
  • Online Data Definition Language (DDL) operations facilitated by the InnoDB Storage Engine
  • Tools such as Information schema and Performance Schema to monitor server activities and query efficiency
  • Configurable SQL Mode options, including a strict mode to enforce SQL standard compliance
  • Distributed transaction management through X/Open XA with two-phase commit support via InnoDB
  • Transaction handling with savepoint support provided by InnoDB and NDB Cluster Storage Engines, ensuring full ACID compliance
  • Integration of SSL encryption and query caching mechanisms
  • Support for nested SELECT statements alongside built-in replication features:
    • Asynchronous replication setups including master-slave and multi-source configurations
    • Semi-synchronous replication where the master waits for confirmation from slaves
    • Synchronous multi-master replication enabled by MySQL Cluster
    • Virtual synchronous multi-master configurations through Galera Cluster or the Group Replication plugin
  • Full-text indexing and search capabilities implemented by InnoDB starting from MySQL 5.6
  • Embedded database library functionality combined with comprehensive Unicode support via utf8mb4 encoding
  • Partitioned table management enhanced by optimizer pruning techniques
  • Shared-nothing clustering architecture provided by MySQL Cluster technology
  • Multiple selectable storage engines per table, including native options such as InnoDB, MyISAM, Merge, Memory, Federated, Archive, CSV, Blackhole, and NDB Cluster
  • Commit grouping feature designed to boost transaction throughput

Routine minor updates for MySQL Server are released roughly every two months. The source code is accessible under the GPL license through MySQL’s official website and GitHub repository.

Limitations

When employing storage engines other than the default InnoDB, MySQL does not fully adhere to certain SQL standard features like foreign key constraints. Prior to version 8.0.15, check constraints were recognized syntactically but ignored across all storage engines.

Up until MySQL 5.7, only one trigger per action/timing was allowed on a table, and it was not possible to define triggers on views.

Before version 8.0.28, some functions encountered issues related to the Year 2038 problem, returning incorrect results after 03:14:07 UTC on January 19, 2038. This issue was addressed with a fix released in 2022.

Deployment

MySQL is commonly installed using binary packages managed by package management systems on most Linux distributions, followed by additional configuration steps for security hardening and performance tuning.

Initially positioned as an entry-level alternative to proprietary database systems, MySQL has evolved to accommodate larger-scale requirements but continues to be predominantly deployed in small to medium single-server environments. It is widely used within LAMP-based web applications or as an independent database server. Its popularity stems from ease of use and a rich ecosystem of open source utilities such as phpMyAdmin.

Medium-sized deployments typically enhance capacity by utilizing multi-processor servers equipped with substantial memory resources. For more extensive environments, scaling out through multiple servers improves both performance and fault tolerance. Common high-end configurations involve a robust master node responsible for write operations that replicates data continuously to multiple read-only slave nodes. This setup enables quick failover by promoting slaves when necessary, reducing downtime.

Performance improvements can also be achieved by caching query results in memory using tools like memcached, or by implementing database sharding—distributing data across several server clusters—to support applications at very large scales.

High availability solutions

Oracle MySQL delivers a high availability framework by integrating components such as MySQL Router and MySQL Shell, all based on Group Replication, an open source technology. MariaDB provides similar offerings for ensuring high availability.

Cloud deployment

MySQL can be deployed across leading cloud environments including Microsoft Azure, Amazon EC2, and Oracle Cloud Infrastructure. Typical cloud deployment approaches include:

Virtual machine images
Users have the option to upload customized VM images containing MySQL or select from pre-built images optimized for MySQL, like those available through Amazon EC2.
Managed MySQL services
Various cloud vendors supply MySQL as a fully managed service, overseeing installation and upkeep while customers are billed according to usage. Prominent managed MySQL platforms include Amazon Relational Database Service, Oracle MySQL HeatWave Database Service, Azure Database for MySQL, Rackspace, HP Converged Cloud, Heroku, and Jelastic. This approach transfers operational duties to the provider, allowing organizations to concentrate on developing applications.

Graphical user interfaces

A graphical user interface (GUI) allows interaction with software or devices through graphical elements and visual cues instead of command-line input.

Numerous third-party proprietary and open-source graphical management tools are compatible with MySQL, enabling users to visually administer database schemas and data.

MySQL Workbench

MySQL Workbench, created by MySQL AB, is a comprehensive environment designed for visual database administration and schema modeling of MySQL databases.

It is available in three variants: the free and open source Community Edition accessible via the MySQL website; the commercial Standard Edition which offers additional features; and the MySQL Cluster CGE edition.

Additional GUI tools

Command-line interfaces

A command-line interface enables users to operate software by entering text commands. MySQL provides several command-line utilities, with the main interface being the client.

MySQL Utilities, initially integrated within MySQL Workbench, is now offered as an independent download from Oracle for routine maintenance and administrative functions.

Percona Toolkit is a cross-platform collection of tools written in Perl, designed for replication verification, repairing corrupted data, automating workflows, and enhancing performance. It is included in distributions such as CentOS, Debian, and also available for Fedora and Ubuntu. This toolkit originated from Maatkit, which was discontinued in 2011.

MySQL Shell supports interactive management using JavaScript, Python, or SQL modes to provide versatile database administration.

Application programming interfaces

A wide range of programming languages provide dedicated APIs with libraries tailored for accessing MySQL databases. Examples include MySQL Connector/Net for .NET/CLI languages and the JDBC driver for Java environments. Furthermore, the ODBC driver MySQL Connector/ODBC facilitates connectivity between MySQL and languages supporting ODBC such as ASP and ColdFusion. The HTSQL query system incorporates a MySQL adapter that enables direct communication between web clients and MySQL databases through structured URLs. Additional drivers exist for languages including Python and Node.js.

Project forks

Numerous forks of MySQL have been developed, including the following:

Active Forks

MariaDB
MariaDB is a community-driven fork designed to remain freely available under the GNU GPL license. It is led by the original creators of MySQL and was established in response to concerns following Oracle's acquisition.
Percona Server for MySQL
Percona Server for MySQL focuses on maintaining strong compatibility with official MySQL versions and incorporates XtraDB, which is Percona’s variant of the InnoDB storage engine.

Discontinued Forks

Drizzle
Drizzle originated as an open-source relational database management system derived from the 6.0 development branch of MySQL. It supported client/server architecture and SQL, and was released under both GPL and BSD licenses.
WebScaleSQL
Introduced in 2014 by Facebook, Google, LinkedIn, and Twitter, WebScaleSQL was a joint fork of MySQL 5.6 tailored for large-scale environments. It offered enhancements for extensive replication and server farm management, aiming to unify efforts in maintaining large-scale MySQL branches under the GPLv2 license.
OurDelta
Developed by Australian firm Open Query (later acquired by Catalyst IT Australia), OurDelta included versions based on MySQL 5.0 and MariaDB 5.1. It incorporated community patches and transferred its build tools to Monty Program (now MariaDB Plc) after fulfilling its goals.

See also

External links