The Full Wiki

MySQL: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

Screenshot of the default MySQL command line.
Developer(s) Oracle Corporation
Initial release May 23, 1995 (1995-05-23)
Stable release 5.1.45  (March 17, 2010; 1 day(s) ago (2010-03-17)) [+/−]
Preview release 5.5.2  (February 14, 2010; 32 day(s) ago (2010-02-14)) [+/−]
Written in C, C++
Operating system Cross-platform
Available in English
License GNU General Public License (version 2, with linking exception) or proprietary EULA

MySQL is a relational database management system (RDBMS)[1] that runs as a server providing multi-user access to a number of databases. MySQL is officially pronounced /maɪˌɛskjuːˈɛl/ ("My S-Q-L"),[2] but is often /maɪsiːˈkwɛl/ ("Micey Quell") or /maɪˈsiːkwəl/ ("My Sequel").[citation needed] It is named for original developer Michael Widenius's daughter My.[3]

The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL is owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Sun Microsystems, a subsidiary of Oracle Corporation.[4]

Members of the MySQL community have created several forks such as Drizzle and MariaDB. Both forks were in progress long before the Oracle acquisition (Drizzle was announced 8 months before the Sun acquisition).

Free-software projects that require a full-featured database management system often use MySQL. Such projects include (for example) WordPress, phpBB, Drupal and other software built on the LAMP software stack. MySQL is also used in many high-profile, large-scale World Wide Web products including Wikipedia, Google and Facebook.



Many web applications use MySQL as the database component of a LAMP software stack. Its popularity for use with web applications is closely tied to the popularity of PHP, which is often combined with MySQL. Several high-traffic web sites (including Flickr,[5] Facebook,[6][7] Wikipedia,[8] Google[9] (though not for searches), Nokia[10] and YouTube[11]) use MySQL for data storage and logging of user data.

Platforms and interfaces

MySQL code uses C and C++. The SQL parser uses yacc and a home-brewed lexer,[12]

MySQL works on many different system platforms, including AIX, BSDi, FreeBSD, HP-UX, i5/OS, Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, eComStation, OS/2 Warp, QNX, IRIX, Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare, Sanos, Tru64 and Microsoft Windows. A port of MySQL to OpenVMS also exists.[13]

All major programming languages with language-specific APIs include Libraries for accessing MySQL databases. In addition, an ODBC interface called MyODBC allows additional programming languages that support the ODBC interface to communicate with a MySQL database, such as ASP or ColdFusion. The MySQL server and official libraries are mostly implemented in ANSI C/ANSI C++.

Management and Graphical Frontends

MySQL Workbench in Windows, displaying the Home Screen which streamlines use of its full capabilities

MySQL is primarily an RDBMS and therefore ships with no GUI tools to administer MySQL databases or manage data contained within. Users may use the included command-line tools,[14] or download MySQL Frontends from various parties that have developed desktop software and web applications to manage MySQL databases, build database structure, and work with data records.


The official MySQL Workbench is a free integrated environment developed by MySQL AB, that enables users to graphically administer MySQL databases and visually design database structure. MySQL Workbench replaces the previous package of software, MySQL GUI Tools. Similar to other third-party packages but still considered the authoritative MySQL frontend, MySQL Workbench lets users manage the following:

  • Database design & modeling
  • SQL development — replacing MySQL Query Browser
  • Database administration — replacing MySQL Administrator

MySQL Workbench is available in two editions, the regular free and open source Community Edition which may be downloaded from the MySQL website, and the proprietary Standard Edition which extends and improves the feature set of the Community Edition.

Third party

Several other third-party proprietary and free graphical administration applications (or "Frontends") are available that integrate with MySQL and enable users to work with database structure and data visually. Some well-known frontends are:


MySQL can be built and installed manually from source code, but this can be tedious so it is more commonly installed from a binary package unless special customizations are required. On most Linux distributions the package management system can download and install MySQL with minimal effort, though further configuration is often required to adjust security and optimization settings.

Though MySQL began as a low-end alternative to more powerful proprietary databases, it has gradually evolved to support higher-scale needs as well.

It is still most commonly used in small to medium scale single-server deployments, either as a component in a LAMP based web application or as a standalone database server. Much of MySQL's appeal originates in its relative simplicity and ease of use, which is enabled by an ecosystem of open source tools such as phpMyAdmin.

In the medium range, MySQL can be scaled by deploying it on more powerful hardware, such as a multi-processor server with gigabytes of memory.

There are however limits to how far performance can scale on a single server, so on larger scales, multi-server MySQL deployments are required to provide improved performance and reliability. A typical high-end configuration can include a powerful master database which handles data write operations and is replicated to multiple slaves that handle all read operations.[16] The master server synchronizes continually with its slaves so in the event of failure a slave can be promoted to become the new master, minimizing downtime. Further improvements in performance can be achieved by caching the results from database queries in memory using memcached, or breaking down a database into smaller chunks called shards which can be spread across a number of distributed server clusters.[17]


As of April 2009, MySQL offers MySQL 5.1 in two different variants: the MySQL Community Server and Enterprise Server.[18] They have a common code base and include the following features:

The developers release monthly versions of the MySQL Enterprise Server. The sources can be obtained either from MySQL's customer-only Enterprise site or from MySQL's Bazaar repository, both under the GPL license. The MySQL Community Server is published on an unspecified schedule under the GPL and contains all bug fixes that were shipped with the last MySQL Enterprise Server release. Binaries are no longer provided by MySQL for every release of the Community Server.[20][21]

Distinguishing features

MySQL implements the following features, which some other RDBMS systems may not:

  • Multiple storage engines, allowing one to choose the one that is most effective for each table in the application (in MySQL 5.0, storage engines must be compiled in; in MySQL 5.1, storage engines can be dynamically loaded at run time):
  • Commit grouping, gathering multiple transactions from multiple connections together to increase the number of commits per second.

Product History

Milestones in MySQL development include:

  • Original development of MySQL by Michael Widenius and David Axmark beginning in 1994[23]
  • First internal release on 23 May 1995
  • Windows version was released on 8 January 1998 for Windows 95 and NT
  • Version 3.23: beta from June 2000, production release January 2001
  • Version 4.0: beta from August 2002, production release March 2003 (unions)
  • Version 4.01: beta from August 2003, Jyoti adopts MySQL for database tracking
  • Version 4.1: beta from June 2004, production release October 2004 (R-trees and B-trees, subqueries, prepared statements)
  • Version 5.0: beta from March 2005, production release October 2005 (cursors, stored procedures, triggers, views, XA transactions)
The developer of the Federated Storage Engine states that "The Federated Storage Engine is a proof-of-concept storage engine",[24] but the main distributions of MySQL version 5.0 included it and turned it on by default. Documentation of some of the short-comings appears in "MySQL Federated Tables: The Missing Manual".
  • Sun Microsystems acquired MySQL AB on 26 February 2008.[4]
  • Version 5.1: production release 27 November 2008 (event scheduler, partitioning, plugin API, row-based replication, server log tables)
Version 5.1 contained 20 known crashing and wrong result bugs in addition to the 35 present in version 5.0.[25]
MySQL 5.1 and 6.0 showed poor performance when used for data warehousing — partly due to its inability to utilize multiple CPU cores for processing a single query.[26]

Future releases

The MySQL 6 roadmap outlines support for:

  • Referential integrity and Foreign key support for all storage engines is targeted for release in MySQL 6.1 (although it has been present since version 3.23.44 for InnoDB).
  • Support for supplementary Unicode characters, beyond the 65,536 characters of the Basic Multilingual Plane (BMP); announced for MySQL 6.0.
  • A new storage engine called Falcon. A preview of Falcon is available on MySQL's website.

Support and licensing

Via MySQL Enterprise MySQL AB offers support itself, including a 24/7 service with 30-minute response time. The support team has direct access to the developers as necessary to handle problems. In addition, it hosts forums and mailing lists, employees and other users are often available in several IRC channels providing assistance.

In addition to official product support from Sun, other companies offer support and services related to usage of MySQL. For example, Pythian offers full database administration, architecture, optimization and training services. Percona and 42sql offer services related to optimization and Monty Program Ab offers non-recurring engineering such as patches to MySQL. OpenQuery provides MySQL training.

Buyers of MySQL Enterprise have access to binaries and software certified for their particular operating system, and access to monthly binary updates with the latest bug-fixes. Several levels of Enterprise membership are available, with varying response times and features ranging from how to and emergency support through server performance tuning and system architecture advice. The MySQL Network Monitoring and Advisory Service monitoring tool for database servers is available only to MySQL Enterprise customers.

Potential users can install MySQL Server as free software under the GNU General Public License (GPL), and the MySQL Enterprise subscriptions include a GPL version of the server, with a traditional proprietary version available on request at no additional cost for cases where the intended use is incompatible with the GPL.[27]

Both the MySQL server software itself and the client libraries use dual-licensing distribution. Users may choose the GPL,[28] which MySQL has extended with a FLOSS License Exception. It allows Software licensed under other OSI-compliant open source licenses, which are not compatible to the GPL, to link against the MySQL client libraries.[29]

Customers that do not wish to follow the terms of the GPL may purchase a proprietary license.[30]

Like many open-source programs, MySQL has trademarked its name, which others may use only with the trademark holder's permission.[31]

Corporate backing history

In October 2005, Oracle Corporation acquired Innobase OY, the Finnish company that developed the third-party InnoDB storage engine that allows MySQL to provide such functionality as transactions and foreign keys. After the acquisition, an Oracle press release[32] mentioned that the contracts that make the company's software available to MySQL AB would be due for renewal (and presumably renegotiation) some time in 2006. During the MySQL Users Conference in April 2006, MySQL issued a press release that confirmed that MySQL and Innobase OY agreed to a "multi-year" extension of their licensing agreement.[33].

In February 2006, Oracle Corporation acquired Sleepycat Software,[34] makers of the Berkeley DB, a database engine providing the basis for another MySQL storage engine. This had little effect, as Berkeley DB was not widely used, and was deprecated (due to lack of use) in MySQL 5.1.12, a pre-GA release of MySQL 5.1 released in October 2006.[35]

In January 2008, Sun Microsystems bought MySQL[36] for USD $1 billion.

In April 2009, Oracle Corporation entered into an agreement to purchase Sun Microsystems,[37] then owners of the MySQL intellectual property. Sun's board of directors unanimously approved the deal, it was also approved by Sun's shareholders, and by the U.S. government on August 20, 2009.[38] On December 14, 2009, Oracle pledged to continue to enhance MySQL.[39] as it had done for the previous 4 years. The Oracle acquisition was approved by the European Commission on January 21, 2010[40].

Forks of MySQL

MySQL forks include Drizzle and MariaDB.

See also

Frontend applications:

Other RDBMS:


  1. ^ Robin Schumacher, Arjen Lentz. "Dispelling the Myths". MySQL AB. Retrieved 2007-02-10. 
  2. ^ "What is MySQL?, MySQL 5.0 Reference Manual". MySQL AB. Retrieved 2007-02-10. 
  3. ^ "FAQ MariaDB, Why is the project called MariaDB?". Monty Widenius. Retrieved 2009-01-18. 
  4. ^ a b Sun Microsystems Announces Completion of MySQL Acquisition; Paves Way for Secure, Open Source Platform to Power the Network Economy, Sun Microsystems Press release, February 26, 2008
  5. ^ "YouTube, Flickr, and Wikipedia to Share their Secrets of Success at the 2007 MySQL Conference & Expo". MySQL. 10 April 2007. Retrieved 2009-12-09. 
  6. ^ Sobel, Jason (21 December 2007). "Keeping Up". Facebook Blog. 
  7. ^ Malik, Om (25 April 2008). "Facebook’s Insatiable Hunger for Hardware". GigaOM. Retrieved 2008-10-30. 
  8. ^ "Wikimedia servers - Overall system architecture". Retrieved 2009-09-11. 
  9. ^ Claburn, Thomas (24 April 2007). "Google Releases Improved MySQL Code". Information Week. Retrieved 2008-11-30. 
  10. ^
  11. ^
  12. ^ "MySQL Internals Manual". 2009-03-04. Retrieved 2009-06-08. 
  13. ^ Jean-François Piéronne. "PCSI Kits of Open Source Software for OpenVMS". Retrieved 2009-06-08. 
  14. ^ MySQL Command line tools: mysql and mysqladmin
  15. ^ HeidiSQL Grid editing features, using various editors for text, hex/binary, enum, set, date/time columns
  16. ^ "The future of replication in MySQL". Facebook. Retrieved 2009-12-09. 
  17. ^ "Database Sharding". Code Futures. Retrieved 2009-12-09. 
  18. ^ "Which Should I Use: MySQL Enterprise or MySQL Community Server?". MySQL AB. Retrieved 2009-04-08. 
  19. ^ "4.6.9. mysqlhotcopy - A Database Backup Program". MySQL 5.0 Reference Manual. Sun Microsystems. Retrieved 2009-09-23. "mysqlhotcopy is a Perl script [...]. It uses Lock Tables, Flush Tables, and cp or scp to make a database backup quickly [...] but it can be run only on the same machine where the database directories are located. mysqlhotcopy works only for backing up MyISAM and Archive tables. It runs on Unix and NetWare." 
  20. ^ "Peter Zaitsev's blog". Retrieved 2009-06-08. 
  21. ^ "Kaj Arnö's reply". Retrieved 2009-06-08. 
  22. ^ "The DB2 for i (IBMDB2I) Storage Engine for MySQL on IBM i". MySQL. Retrieved 2010-01-18. 
  23. ^ "Five Questions With Michael Widenius - Founder And Original Developer of MySQL". Retrieved 2009-06-08. 
  24. ^ "capttofu: FederatedX Pluggable Storage Engine Released!". Retrieved 2009-04-03. 
  25. ^ "Archives - Oops, we did it again (MySQL 5.1 released as GA wi". Planet MySQL. 2008-11-29. Retrieved 2009-04-03. 
  26. ^ "TPC-H Run on MySQL 5.1 and 6.0 | MySQL Performance Blog". MySQL Performance Blog. Retrieved 2009-06-08. 
  27. ^ "Must I purchase MySQL Enterprise under MySQL's Commercial License in order to receive support?". MySQL AB. 
  28. ^ "MySQL AB :: MySQL Open Source License". Retrieved 2009-06-08. 
  29. ^ "MySQL AB :: FLOSS License Exception". Retrieved 2009-06-08. 
  30. ^ "MySQL AB :: MySQL Commercial License". Retrieved 2009-06-08. 
  31. ^ "MySQL AB Trademark Policy". MySQL AB. September 2005. Retrieved 28 February 2010. 
  32. ^ "Oracle Plans to Increase Support for Open Source Software". Oracle and InnoDB. 
  33. ^ "MySQL to Promote New Open Source DB Engines from its Partners and Dev Community". MySQL AB. 
  34. ^ "Oracle Buys Sleepycat, Is JBoss Next?". Charles Babcock. 
  35. ^ "MySQL 5.1.12 change list". 
  36. ^ "Sun to Acquire MySQL". 
  37. ^ "Oracle to Buy Sun". Sun Microsystems Press Release. 
  38. ^ "Oracle wins U.S. approval to buy Sun Microsystems". Reuters. August 20, 2009. Retrieved 2009-09-30. 
  39. ^
  40. ^ "Mergers: Commission clears Oracle's proposed acquisition of Sun Microsystems". 

External links


Up to date as of January 15, 2010

Definition from Wiktionary, a free dictionary



Wikipedia has an article on:



Pronounced maɪˌɛskjuːˈɛl[1](My S Q L)

Proper noun




  1. (software) An open source relational database management system.

Related terms


  • Notes:
  1. ^ "What is MySQL?, MySQL 5.0 Reference Manual." MySQL AB. URL accessed on 2007-02-10.


Up to date as of January 23, 2010

From Wikibooks, the open-content textbooks collection


MySQL is a free, widely used SQL engine. It can be used as a fast database as well as a rock-solid SGDB using a modular engine architecture.

The purpose of this wikibook is to provide a practical knowledge on using the database from two points of view:

  • application developer: learn about SQL basics, phpMyAdmin, query optimization
  • system administrator: learn about installation, security, maintenance, failover, high availability

Best of all, this book is freely available for everybody to use and share, under the GNU Free Documentation License.


Wikibook Development Stages
Sparse text 00%.svg Developing text 25%.svg Maturing text 50%.svg Developed text 75%.svg Comprehensive text: 100%.svg

This is the table of contents, with the current progress. Click on a chapter title to go to its separate page.


  1. Development stage: 50% (as of ) What is SQL?
  2. Development stage: 50% (as of ) Why MySQL?
  3. Development stage: 50% (as of ) MySQL and its forks

MySQL Practical Guide


The basic SQL commands

  1. Development stage: 75% (as of ) Browsing the databases
  2. Development stage: 50% (as of ) Specifying table names
  3. Development stage: 50% (as of ) Definitions
  4. Development stage: 50% (as of ) User Variables
  5. Development stage: 50% (as of ) Alias
  6. Development stage: 50% (as of ) Queries
  7. Development stage: 50% (as of ) Data manipulation
  8. Development stage: 50% (as of ) Table manipulation
  9. Development stage: 50% (as of ) Using/Dealing with NULL
  10. Development stage: 75% (as of ) Reserved Words
  11. Development stage: 50% (as of ) Data Types
  12. Development stage: 00% (as of ) Operators
  13. Development stage: 00% (as of ) Import / export
  14. Development stage: 25% (as of ) Functions
  15. Development stage: 50% (as of ) Exercises
  16. Development stage: 50% (as of ) Pivot table or a crosstab report

Table types

  1. Development stage: 50% (as of ) MyISAM and InnoDB
  2. Development stage: 25% (as of ) Merge Table
  3. Development stage: 00% (as of ) MEMORY / HEAP
  4. Development stage: 00% (as of ) BDB
  6. Development stage: 25% (as of ) Miscellaneous


  • With other databases
  • With SQL92
  • Writing portable, non-MySQL-specific code


  1. Development stage: 50% (as of ) Installation
  2. Development stage: 50% (as of ) Start the service
  3. Development stage: 25% (as of ) Configuration
  4. Development stage: 50% (as of ) Privileges
  5. Development stage: 50% (as of ) Processes
  6. Security
  7. Development stage: 50% (as of ) Backup
  8. Logs
  9. Development stage: 25% (as of ) Admin Tools

Databases manipulation

  1. Development stage: 50% (as of ) Creation
  2. Development stage: 50% (as of ) Deletion
  3. Development stage: 75% (as of ) Rename
  4. Development stage: 50% (as of ) Copy
  5. Development stage: 00% (as of ) Migration from other databases
  6. Development stage: 50% (as of ) Tools for data modeling


  • KEY/INDEX, EXPLAIN, ANALYZE TABLE table, BENCHMARK(count, expression), difference between KEY and PRIMARY KEY

Stored Programs

  1. Development stage: 00% (as of ) Triggers
  2. Development stage: 00% (as of ) Events
  3. Development stage: 00% (as of ) Stored Procedures
  4. Development stage: 00% (as of ) Procedural extensions to SQL

Maintenance and evolution

  • tricks: IF NOT EXIST...
  • Software:
    • mysql -f (cf. tikiwiki's forgiving 1.10 update procedure)
    • Savane's migration scripts, in the update/version directory
  • Charsets: what are Latin1 and UTF-8? How to cleanly convert a database from Latin1 to UTF-8 (not just mysqldump|iconv, also ALTER TABLE table MODIFY col VARCHAR(100) CHARACTER SET utf8 + SET NAMES 'utf8' in PHP), phpMyAdmin bugs (need to add SET NAMES utf8 in some circumstances)


  1. Development stage: 75% (as of ) Security
  2. Development stage: 75% (as of ) Optimization
  3. Development stage: 50% (as of ) PHP



  1. GNU Free Documentation License


Case study: I was suggested to use SPIP (a system to manage articles and news) for a sample study. Mediawiki might be interesting as well :)

Add a list of CLIENTS to use with MYSQL, I dont know of any good ones, MYSQL GUI ones are ok, but I need some others


Related wikibooks

  • SQL: about general SQL programming, with lots of exercises.
  • Programming:Converting_MySQL_to_PostgreSQL: highlights the differences between the two database servers

Compatible sources

The following sources are released under the GFDL and hence good candidates for inclusion in the wikibook, as well as joint writing efforts:


Simple English


Developer:MySQL AB, a subsidiary of Sun Microsystems since February 2008 which is also a subsidiary of Oracle Corporation since January 2010
Initial release:23 May 1995
Latest release:5.1.50 (Community Server) / 17 August 2010
Available language(s):English
Use: Relational database management system

License:GNU General Public License or proprietary EULA

MySQL is a database system used by many websites on the Internet.



MySQL was first released in May 1995 and a Windows version was released in January 1998. The latest version (5.1) was released in November 2008.


MySQL is compatible with many major programming languages. The most common one is PHP. An ODBC interface (called MyODBC) has been made so that users of Microsoft's ASP language can use MySQL.

Major Users

Some of the largest MySQL users on the internet include:

Many PHP scripts also use MySQL. These include:


  1. Apple's Xserve uses MySQL

Other pages

Management Tools

Got something to say? Make a comment.
Your name
Your email address