MySQL

MySQL
Developer(s) MySQL AB (A subsidiary of Oracle)
Initial release May 23, 1995 (1995-05-23)
Stable release 5.5.19 / December 8, 2011; 2 months ago (2011-12-08)
Preview release 5.6.4 / December 20, 2011; 57 days ago (2011-12-20)
Written in C, C++
Operating system Cross-platform
Available in English
Type RDBMS
License GNU General Public License (version 2, with linking exception) or proprietary EULA
Website www.mysql.com
dev.mysql.com

MySQL ( /m ˌɛskjuːˈɛl/ "My S-Q-L",[1] officially, but also commonly /m ˈskwəl/ "My Sequel") is a relational database management system (RDBMS)[2] that runs as a server providing multi-user access to a number of databases. It is named after developer Michael Widenius' daughter, My.[3] The SQL phrase stands for Structured Query Language.[4]

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 was owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Oracle Corporation.[5]

Free-software-open source projects that require a full-featured database management system often use MySQL. For commercial use, several paid editions are available, and offer additional functionality. Applications which use MySQL databases include: TYPO3, Joomla, 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[6] (though not for searches), Facebook,[7] and Twitter.[8]

Contents

Uses

MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP web application software stack—LAMP is an acronym for "Linux, Apache, MySQL, Perl/PHP/Python".

MySQL is used in some of the most frequently visited websites on the Internet, including Flickr,[9] Nokia.com,[10] YouTube[11] and as previously mentioned, Wikipedia,[12] Google[13], Facebook[14][15] and Twitter.[16]

Platforms and interfaces

MySQL is written in C and C++. Its SQL parser is written in yacc, and a home-brewed lexical analyzer named sql_lex.cc.[17]

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

Many programming languages with language-specific APIs include libraries for accessing MySQL databases. These include MySQL Connector/Net for integration with Microsoft's Visual Studio (languages such as C# and VB are most commonly used) and the JDBC driver for Java. 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 HTSQL - URL-based query method also ships with a MySQL adapter, allowing direct interaction between a MySQL database and any web client via structured URLs. The MySQL server and official libraries are mostly implemented in ANSI C/ANSI C++.

Management and graphical frontends

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,[19] 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.

Official

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:

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

Third-party proprietary and free graphical administration applications (or "front ends") are available that integrate with MySQL and enable users to work with database structure and data visually. Some well-known front ends, in alphabetical order, are:

Other available proprietary MySQL front ends include dbForge Studio for MySQL, Epictetus, Oracle SQL Developer, SchemaBank, SQLyog, SQLPro SQL Client, Toad Data Modeler,

Command line

MySQL ships with a suite of command-line tools for tasks such as querying the database, backing up data, inspecting status, performing common tasks such as creating a database, and many more. A variety of third-party command-line tools is also available, including Maatkit, which is written in Perl.

Deployment

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.[22] 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.[23]

Cloud-Based Deployment

Another deployment option is running MySQL on cloud computing platforms such as Amazon EC2. There are two common deployment models for MySQL on the cloud:

A third option is managed MySQL hosting on the cloud, where the database is not offered as a service, but the cloud provider hosts the database and manages it on the application owner's behalf. As of 2011, of the major cloud providers, only Rackspace offers managed hosting for MySQL databases.[26]

Features

As of April 2009, MySQL offered MySQL 5.1 in two different variants: the open source MySQL Community Server and the commercial Enterprise Server. MySQL 5.5 is offered under the same licences.[27] They have a common code base and include the following features:

The developers release monthly versions of the MySQL Server. The sources can be obtained from MySQL's website or from MySQL's Bazaar repository, both under the GPL license.

Distinguishing features

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

Limitations

MySQL does not currently comply with the SQL standard for some of the implemented functionality, including issues like silent ignore of standard SQL syntax.[31] Triggers are currently limited to one per action / timing, i.e. maximum one after insert and one before insert on the same table.[32] There are no triggers on views.[32]

Product history

Milestones in MySQL development include:

The developer of the Federated Storage Engine states that "The Federated Storage Engine is a proof-of-concept storage engine",[34] 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".[35]
Version 5.1 contained 20 known crashing and wrong result bugs in addition to the 35 present in version 5.0 (almost all fixed as of release 5.1.51).[36]
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.[37]

Future releases

MySQL Server 6.0.11-alpha was announced 22 May 2009 as the last release of the 6.0 line. Future MySQL Server development uses a New Release Model. Features developed for 6.0 are being incorporated into future releases.

MySQL 5.6, a development milestone release, was announced at the MySQL users conference 2011. New features include performance improvements to the query optimizer, higher transactional throughput in InnoDB, new NoSQL-style memcached APIs, improvements to partitioning for querying and managing very large tables, improvements to replication and better performance monitoring by expanding the data available through the PERFORMANCE_SCHEMA.[41] In July further previews with a BINLOG API, group commit, and InnoDB full text searching were released.

Support and licensing

MySQL offers support via their MySQL Enterprise product, including a support service. The support communicates with 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.

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.[42]

Both the MySQL server software itself and the client libraries use dual-licensing distribution. Users may choose the GPL,[43] 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.[44]

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

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

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 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.[47] 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.[48]

In February 2006, Oracle Corporation acquired Sleepycat Software,[49] 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.[50]

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

In April 2009, Oracle Corporation entered into an agreement to purchase Sun Microsystems,[52] then owners of MySQL copyright and trademark. 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.[53] On December 14, 2009, Oracle pledged to continue to enhance MySQL[54] as it had done for the previous four years.

A movement against Oracle's acquisition of MySQL, to "Save MySQL"[55] from Oracle was started by one of the MySQL founders, Monty Widenius. The petition of 50,000+ developers and users called upon the European Commission to block approval of the acquisition. At the same time, several Free Software opinion leaders (including Eben Moglen, Pamela Jones of Groklaw, Jan Wildeboer and Carlo Piana, who also acted as co-counsel in the merger regulation procedure) advocated for the unconditional approval of the merger. As part of the negotiations with the European Commission, Oracle committed that MySQL server will continue to use the dual-licensing strategy long used by MySQL AB with commercial and GPL versions available until at least 2015. The antitrust of the EU had been "pressuring it to divest MySQL as a condition for approval of the merger." But, as revealed by Wikileaks, the US Department of Justice and Antitrust, at the request of Oracle, pressured the EU to unconditionally approve the merger.[56] The Oracle acquisition was eventually unconditionally approved by the European Commission on January 21, 2010.[57]

Meanwhile, Monty Widenius has released a GPL-only fork, MariaDB. MariaDB is based on the same code base as MySQL server and strives to maintain compatibility with Oracle provided versions.[58]

Forks

MySQL versions


[59] [60] [61] [62] [63] [64]

See also

References

  1. ^ "What is MySQL?, MySQL 5.1 Reference Manual". MySQL AB. http://dev.mysql.com/doc/refman/5.1/en/what-is-mysql.html. Retrieved 2010-03-19. "The official way to pronounce “MySQL” is “My Ess Que Ell” (not “my sequel”), but we do not mind if you pronounce it as “my sequel” or in some other localized way." 
  2. ^ Robin Schumacher, Arjen Lentz. "Dispelling the Myths". MySQL AB. http://dev.mysql.com/tech-resources/articles/dispelling-the-myths.html. Retrieved 2007-02-10. 
  3. ^ "History of MySQL, MySQL 5.1 Reference Manual". MySQL AB. http://dev.mysql.com/doc/refman/5.1/en/history.html. Retrieved 2011-08-26. 
  4. ^ "What is MySQL, MySQL 5.1 Reference Manual". MySQL AB. http://dev.mysql.com/doc/refman/5.1/en/what-is-mysql.html. Retrieved 2011-08-26. 
  5. ^ 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
  6. ^ "Google Runs MySQL". TheOpenForce. http://zurlocker.typepad.com/theopenforce/2005/12/googles_use_of_.html. Retrieved 2010-08-03. "AdWords was built using the MySQL database" 
  7. ^ "MySQL at Facebook". O'Reilly, Mark callaghan. http://www.youtube.com/watch?v=Zofzid6xIZ4. Retrieved 2010-08-03. "x,000 servers, ... Master-slave replication, InnoDB" 
  8. ^ "Big and Small Data at Twitter: MySQL CE 2011". myNoSQL. 17 April 2011. http://nosql.mypopescu.com/post/4687379038/big-and-small-data-at-twitter-mysql-ce-2011. Retrieved 2011-10-20. 
  9. ^ "YouTube, Flickr, and Wikipedia to Share their Secrets of Success at the 2007 MySQL Conference & Expo". MySQL. 10 April 2007. http://dev.mysql.com/tech-resources/articles/mysqluc-2007.html. Retrieved 2009-12-09. 
  10. ^ MySQL.com
  11. ^ MySQL.com
  12. ^ "Wikimedia servers – System architecture". http://meta.wikimedia.org/wiki/Wikimedia_servers#System_architecture. Retrieved 2011-01-16. 
  13. ^ Claburn, Thomas (24 April 2007). "Google Releases Improved MySQL Code". Information Week. http://www.informationweek.com/news/internet/showArticle.jhtml?articleID=199201237. Retrieved 2008-11-30. 
  14. ^ Sobel, Jason (21 December 2007). "Keeping Up". Facebook Blog. http://blog.facebook.com/blog.php?post=7899307130. Retrieved 2008-10-30. 
  15. ^ Malik, Om (25 April 2008). "Facebook’s Insatiable Hunger for Hardware". GigaOM. http://gigaom.com/2008/04/25/facebooks-insatiable-hunger-for-hardware/. Retrieved 2008-10-30. 
  16. ^ "Big and Small Data at Twitter: MySQL CE 2011". myNoSQL. 17 April 2011. http://nosql.mypopescu.com/post/4687379038/big-and-small-data-at-twitter-mysql-ce-2011. Retrieved 2011-10-20. 
  17. ^ "MySQL Internals Manual". Dev.mysql.com. 2009-03-04. http://dev.mysql.com/doc/internals/en/index.html. Retrieved 2009-06-08. 
  18. ^ Jean-François Piéronne. "PCSI Kits of Open Source Software for OpenVMS". Pi-net.dyndns.org. http://www.pi-net.dyndns.org/anonymous/kits/. Retrieved 2009-06-08. 
  19. ^ MySQL Command line tools: mysql and mysqladmin
  20. ^ HeidiSQL Grid editing features, using various editors for text, hex/binary, enum, set, date/time columns
  21. ^ LibreOffice Base
  22. ^ "The future of replication in MySQL". Facebook. http://www.facebook.com/note.php?note_id=126049465932. Retrieved 2009-12-09. 
  23. ^ "Database Sharding". Code Futures. http://www.codefutures.com/dbshards-cloud/. Retrieved 2009-12-09. 
  24. ^ "Running MySQL on Amazon EC2 with EBS (Elastic Block Store), Amazon Web Services, retrieved 2011-11-20
  25. ^ Klint Finley, "7 Cloud-Based Database Services", ReadWriteWeb, Retrieved 2011-11-9.
  26. ^ "MySQL Server Support at Rackspace", [www.rackspace.com Rackspace.com], Retrieved 2011-11-10.
  27. ^ "Which Should I Use: MySQL Enterprise or MySQL Community Server?". MySQL AB. http://www.mysql.com/products/which-edition.html. Retrieved 2009-04-08. 
  28. ^ MySQL :: InnoDB 1.1 for MySQL 5.5 User’s Guide :: C InnoDB Glossary :: ACID
  29. ^ "4.6.9. mysqlhotcopy - A Database Backup Program". MySQL 5.1 Reference Manual. Oracle. http://dev.mysql.com/doc/refman/5.1/en/mysqlhotcopy.html. 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." 
  30. ^ "The DB2 for i (IBMDB2I) Storage Engine for MySQL on IBM i". MySQL. http://solutions.mysql.com/engines/ibm_db2_storage_engine.html. Retrieved 2010-01-18. 
  31. ^ dev.mysql.com
  32. ^ a b dev.mysql.com
  33. ^ "Five Questions With Michael Widenius - Founder And Original Developer of MySQL". Opensourcereleasefeed.com. http://www.opensourcereleasefeed.com/interview/show/five-questions-with-michael-widenius-founder-and-original-developer-of-mysql. Retrieved 2009-06-08. 
  34. ^ "Capttofu: FederatedX Pluggable Storage Engine Released!". Capttofu.livejournal.com. http://capttofu.livejournal.com/5798.html. Retrieved 2009-04-03. 
  35. ^ Oreillynet.com
  36. ^ "Archives - Oops, we did it again (MySQL 5.1 released as GA wi". Planet MySQL. 2008-11-29. http://www.planetmysql.org/entry.php?id=16232. Retrieved 2009-04-03. 
  37. ^ "TPC-H Run on MySQL 5.1 and 6.0 | MySQL Performance Blog". MySQL Performance Blog. http://www.mysqlperformanceblog.com/2008/04/10/tpc-h-run-on-mysql-51-and-60/. Retrieved 2009-06-08. 
  38. ^ Oracle.com
  39. ^ dev.mysql.com
  40. ^ dev.mysql.com
  41. ^ "What's New in MySQL 5.6". MySQL Developer Zone. http://dev.mysql.com/tech-resources/articles/whats-new-in-mysql-5.6.html. Retrieved 2011-04-21. 
  42. ^ "Must I purchase MySQL Enterprise under MySQL's Commercial License in order to receive support?". MySQL AB. http://www.mysql.com/about/legal/supportpolicies/policies-05.html#q01. 
  43. ^ "MySQL AB :: MySQL Open Source License". Mysql.com. http://www.mysql.com/products/licensing/opensource-license.html. Retrieved 2009-06-08. 
  44. ^ "MySQL AB :: FLOSS License Exception". Mysql.com. http://www.mysql.com/company/legal/licensing/foss-exception.html. Retrieved 2009-06-08. 
  45. ^ "MySQL AB :: MySQL Commercial License". Mysql.com. http://www.mysql.com/company/legal/licensing/commercial-license.html. Retrieved 2009-06-08. 
  46. ^ "MySQL AB Trademark Policy". MySQL AB. September 2005. http://www.mysql.com/company/legal/trademark.html. Retrieved 28 February 2010. 
  47. ^ "Oracle Plans to Increase Support for Open Source Software". Oracle and InnoDB. http://www.oracle.com/innodb/index.html. 
  48. ^ "MySQL to Promote New Open Source DB Engines from its Partners and Dev Community". MySQL AB. http://www.mysql.com/news-and-events/press-release/release_2006_21.html. 
  49. ^ "Oracle Buys Sleepycat, Is JBoss Next?". Charles Babcock. http://www.informationweek.com/software/showArticle.jhtml?articleID=180200853. 
  50. ^ "MySQL 5.1.12 change list". http://mysql.mirror.iweb.ca/doc/refman/5.1/en/news-5-1-12.html. 
  51. ^ "Sun to Acquire MySQL". http://www.mysql.com/news-and-events/sun-to-acquire-mysql.html. 
  52. ^ "Oracle to Buy Sun". Sun Microsystems Press Release. http://www.sun.com/aboutsun/pr/2009-04/sunflash.20090420.1.xml. 
  53. ^ Thomasch, Paul (August 20, 2009). "Oracle wins U.S. approval to buy Sun Microsystems". Reuters. http://www.reuters.com/article/rbssTechMediaTelecomNews/idUSN2053486920090820. Retrieved 2009-09-30. 
  54. ^ Cnet.com
  55. ^ "Save MySQL!". http://www.helpmysql.org/en/thanks. 
  56. ^ Wikileaks Cable Offers New Insights Into Oracle-Sun Deal, By Chris Kanaracus, IDG News Aug 30, 2011 8:10 pm
  57. ^ "Mergers: Commission clears Oracle's proposed acquisition of Sun Microsystems". http://europa.eu/rapid/pressReleasesAction.do?reference=IP/10/40. 
  58. ^ "MariaDB vs MySQL". http://askmonty.org/wiki/MariaDB_versus_MySQL. 
  59. ^ "B.3. Changes in Release 3.23.x (Lifecycle Support Ended)". Oracle. http://dev.mysql.com/doc/refman/4.1/en/news-3-23-x.html. Retrieved 2010-08-24. 
  60. ^ "B.2. Changes in Release 4.0.x (Lifecycle Support Ended)". Oracle. http://dev.mysql.com/doc/refman/4.1/en/news-4-0-x.html. Retrieved 2010-08-24. 
  61. ^ "B.1. Changes in Release 4.1.x (Lifecycle Support Ended)". Oracle. http://dev.mysql.com/doc/refman/4.1/en/news-4-1-x.html. Retrieved 2010-08-24. 
  62. ^ "C.1. Changes in Release 5.0.x (Production)". Oracle. http://dev.mysql.com/doc/refman/5.0/en/news-5-0-x.html#news-5-0-x. Retrieved 2010-08-24. 
  63. ^ "C.1. Changes in Release 5.1.x (Production)". Oracle. http://dev.mysql.com/doc/refman/5.1/en/news-5-1-x.html#news-5-1-x. Retrieved 2010-08-24. 
  64. ^ "C.1. Changes in Release 5.5.x (Development)". Oracle. http://dev.mysql.com/doc/refman/5.5/en/news-5-5-x.html#news-5-5-x. Retrieved 2010-08-24. 

External links