MySQL facts for kids
![]() MySQL logo; the dolphin in the logo is named "Sakila".
|
|
Screenshot of the default MySQL command-line banner and prompt.
|
|
Original author(s) | MySQL AB |
---|---|
Developer(s) | Oracle Corporation |
Initial release | 23 May 1995 |
Stable release |
Lua error in Module:Wd at line 1575: attempt to index field 'wikibase' (a nil value). / Lua error in Module:Wd at line 1571: attempt to index field 'wikibase' (a nil value).
|
Written in | C, C++ |
Operating system | Linux, Solaris, macOS, Windows, FreeBSD |
Available in | English |
Type | RDBMS |
License | GPLv2 or proprietary |
MySQL is a special computer program that helps organize and store information. Think of it like a super-smart digital filing cabinet for computers. It's called a "relational database management system" (RDBMS) because it stores data in tables that are connected, or "related," to each other. These connections help keep the information neat and easy to find.
SQL is like a secret code language that people use to talk to the database. It helps them put information in, find it, change it, or even take it out. The name "MySQL" comes from "My," the daughter of one of its creators, Michael Widenius, and "SQL."
MySQL is also "open-source," which means its code is free for anyone to use and change. It was first owned by a Swedish company called MySQL AB. Later, it was bought by Sun Microsystems, and then by Oracle Corporation. In 2010, one of the original creators, Michael Widenius, started a new project called MariaDB based on MySQL's code.
MySQL is often used with other programs to create websites and apps that need to store lots of information. For example, it's a key part of the LAMP software bundle, which stands for Linux, Apache, MySQL, and Perl/PHP/Python. Many popular websites and applications use MySQL, including Facebook, Flickr, MediaWiki (which runs Wikipedia!), Twitter, and YouTube.
Contents
What is MySQL?
MySQL is written in computer languages called C and C++. It can run on many different computer systems, like Linux, macOS, and Microsoft Windows.
MySQL software is available in two ways:
- It's free and open-source under the GPL. This means anyone can use, change, and share it.
- It's also available under special "proprietary" licenses, which usually means you pay for extra features or support.
If you need help with MySQL, you can find lots of information in its official manual. There are also many online forums and chat groups where people help each other for free. Oracle, the company that owns MySQL now, also offers paid support services.
People who have used MySQL often say it works very well and is fast and stable. They also like that it's easy for developers to use and has good instructions.
How MySQL Started
MySQL was created by a Swedish company called MySQL AB. It was founded by David Axmark, Allan Larsson, and Michael "Monty" Widenius.
The first version of MySQL came out on May 23, 1995. It was first made for personal use. The creators thought other similar programs were too slow, so they built MySQL to be faster and more flexible. They made it work in a way that made it easy for other programmers to switch to MySQL from older systems.
Important Steps in MySQL's Journey
Here are some key moments in MySQL's development:
- 1995: The first version was released.
- 1998: A version for Windows computers became available.
- 2003: Version 4.0 was released, adding new features like "unions" to combine data.
- 2004: Version 4.1 came out, improving how data is stored and searched.
- 2005: Version 5.0 was a big update, adding important features like "stored procedures" and "triggers" that make databases smarter.
- 2008: Sun Microsystems bought MySQL AB.
- 2008: Version 5.1 was released, adding "partitioning" to handle very large tables better.
- 2010: Oracle Corporation bought Sun Microsystems. On the same day, Michael "Monty" Widenius started MariaDB, a new version of MySQL that stayed open-source.
- 2010: MySQL Server 5.5 became widely available. This version made the InnoDB storage engine the default, which is better for handling transactions (like online payments).
- 2013: MySQL 5.6 was released, making the database faster and better at handling large amounts of data. It also added new ways to connect with other programs.
- 2015: MySQL 5.7 was released, adding support for a special data type called JSON, which is used a lot in web development.
- 2018: MySQL Server 8.0 was announced. This version brought many new features, including better ways to work with JSON data and improved performance.
- 2019: MySQL was named "DBMS of the year" by DB-Engines, showing how popular and important it is.
How MySQL Works
MySQL offers two main versions: the free "Community Server" and the paid "Enterprise Server." The Enterprise Server has extra features that install as plugins, but both versions are built from the same core code.
Some important features of MySQL include:
- It understands a lot of the standard SQL language.
- It works on many different computer systems.
- It can use "stored procedures" and "triggers" to automate tasks.
- It has "views" that let you look at data in different ways.
- It can handle "transactions," which are like a series of steps that must all succeed or all fail together (important for things like bank transfers).
- It supports SSL for secure connections.
- It can "cache" (store temporary copies of) frequently used information to make things faster.
- It has built-in "replication," which means it can copy data to other servers to keep it safe and make it faster to access.
- It can do "full-text indexing" to help you search for words inside your data.
- It supports Unicode, so it can handle text in many different languages.
- It can divide large tables into "partitions" to make them easier to manage.
- It can use different "storage engines" for different types of tables. This lets you choose the best way to store your data.
What MySQL Can't Do (or Does Differently)
While MySQL is very powerful, there are a few things it handles differently than some other databases:
- When using some older storage engines, it doesn't fully follow all the rules of the SQL standard, especially for "foreign key references" (which link tables together).
- Before a very recent update (version 8.0.15), it would ignore "check constraints" (rules that make sure data is valid).
- Before MySQL 8.0.28, some built-in functions that deal with dates and times had a problem that would make them stop working correctly after January 19, 2038. This is known as the Year 2038 problem, but it has since been fixed.
How MySQL is Used
You can install MySQL by building it from its source code, but most people just download a ready-to-use package. On many Linux systems, you can install it easily with a few commands.
MySQL started as a simpler option compared to bigger, more expensive databases. But over time, it has grown to handle much larger needs. It's still very popular for small to medium-sized projects, like powering a website or a standalone database server. Many people like MySQL because it's relatively simple to use, especially with tools like phpMyAdmin.
For bigger projects, MySQL can be set up on more powerful computers. For very large projects, multiple MySQL servers are used together. For example, one "master" server handles all the data changes, and many "slave" servers handle all the data reading. This makes the system faster and more reliable. If the master server ever breaks down, one of the slave servers can quickly take its place.
MySQL in the Cloud
MySQL can also run on "cloud computing" platforms. These are like giant data centers that let you use computer resources over the internet. Some common ways to use MySQL in the cloud are:
- Virtual machine image: You can set up a virtual computer in the cloud and install MySQL on it yourself.
- MySQL as a service: Many cloud companies offer MySQL as a service. This means they take care of installing and maintaining the database for you. You just use it and pay for what you need. This is very convenient because you don't have to worry about the technical details of keeping the database running.
Ways to Interact with MySQL
There are different ways to "talk" to a MySQL database.
Graphical Tools
A "graphical user interface" (GUI) is a program that lets you use buttons, menus, and pictures to interact with software, instead of typing commands. Many GUI tools are available for MySQL:
- MySQL Workbench: This is an official tool developed by MySQL AB. It helps you manage your databases and design how your data is organized using visual tools. There's a free "Community Edition" and a paid "Standard Edition" with more features.
- Other GUI Tools: Many other programs exist, like phpMyAdmin, DBeaver, and HeidiSQL, that let you work with MySQL databases using a friendly visual interface.
Command-Line Tools
A "command-line interface" (CLI) is a way to interact with a computer program by typing text commands. MySQL comes with several command-line tools:
- The main tool is the `mysql` client, where you type SQL commands directly.
- MySQL Utilities: These are tools designed to help with common tasks like maintenance.
- Percona Toolkit: This is another set of tools that helps with managing and speeding up MySQL servers.
- MySQL Shell: This tool lets you interact with MySQL using different programming languages like JavaScript, Python, or SQL.
How Programs Connect to MySQL
Many programming languages have special "libraries" or "APIs" (Application Programming Interfaces) that let them connect to MySQL databases. For example, there are specific connectors for Java, .NET, Python, and Node.js.
There's also an interface called ODBC (Open Database Connectivity) that allows many different programming languages to talk to MySQL. This makes it easy for various applications to use MySQL as their data storage.
Other Versions of MySQL
Because MySQL is open-source, other groups have taken its code and made their own versions, called "forks."
Current Versions
- MariaDB: This is a very popular version of MySQL that was started by the original creators of MySQL. It aims to stay free and open-source and work just like the official MySQL versions.
- Percona Server for MySQL: This version is made by a company called Percona. It's very similar to the official MySQL releases but includes extra features and improvements, especially for performance.
Older Versions (No Longer Updated)
- Drizzle: This was an open-source database that started from an older version of MySQL. It was designed to be simpler and faster for web applications, but it is no longer being developed.
- WebScaleSQL: This was a project started by big companies like Facebook, Google, LinkedIn, and Twitter. They worked together to add new features to MySQL that were useful for their huge websites, but this project is also no longer active.
Images for kids
See also
In Spanish: MySQL para niños