Skip to content
Databasesbeginner

What is MySQL?

Updated Nov 30, 20263 min readBased on official documentation
What is MySQL?

In short

MySQL is a database management system, a program that stores, organizes and retrieves data for other applications. It is open source, widely used, and uses SQL, the standard language for talking to databases. Developers use it for websites, apps and reports.

MySQL is one of the most popular open source database systems in the world. It is developed, distributed, and supported by Oracle Corporation. If you are new to databases, this page explains what MySQL is, how it stores data, and why many developers start with it.

What a database is

A database is a structured collection of data. It can be as small as a shopping list or as large as the records of an entire company. To add, read, and change that data, you need a database management system, often shortened to DBMS. MySQL Server is the part that does this work. Your application sends requests to it, and it returns the answers.

Computers handle large amounts of data well, so database systems sit at the heart of many programs. Some run as standalone tools. Others live inside larger applications, quietly doing the storage.

How MySQL organizes data

MySQL is a relational database. That means it stores data in separate tables instead of one big pile. A table has rows, which are individual records, and columns, which are the fields each record holds. Tables can be linked to each other, so a customer table can point to an order table without copying the customer details every time.

You also define rules for how data should look and relate. For example, you can say that a field is required, that a value must be unique, or that one customer can have many orders. MySQL enforces these rules. With a sound design, your application is much less likely to see duplicate, missing, or mismatched records.

What SQL means

The SQL part of the name stands for Structured Query Language. SQL is the most common standard language for working with relational databases. You can type SQL statements directly, for example to pull a report. You can also place SQL inside code written in another language, or use a library that writes the SQL for you. Many developers meet SQL first through such libraries and later learn the raw statements.

A simple query looks like this:

SELECT name, email
FROM customers
WHERE city = 'Berlin';

This asks the database for the names and emails of customers living in Berlin.

Open source and licensing

MySQL is open source, which means anyone can download it, use it, and study or change its source code. The software is distributed under the GPL, the GNU General Public License, which sets out what you may and may not do with it. If you need to embed MySQL in a commercial product and the GPL does not suit you, Oracle offers a commercially licensed version. Check the licensing overview before you decide.

Where MySQL runs

MySQL Server can run on a desktop or laptop beside your other programs, and it needs little attention for everyday use. On a dedicated machine, you can tune its settings to use more memory and processing power. It can also scale across several networked machines. It works in two main ways. In client/server mode, MySQL Server runs as a separate service and your programs connect to it. In embedded mode, the server is linked into your application as a library, which makes a smaller standalone product.

Because of its speed and connectivity, MySQL is a common choice for web applications. Many web frameworks and languages include support for it.

Common mistakes for beginners

New users often skip the design step and create one large table for everything. This makes later changes hard and can lead to repeated data. Spend time deciding which tables you need and how they connect.

Another common mistake is building SQL by joining user input directly into query text. This can open the door to SQL injection, where attackers change your query. Use parameterized queries provided by your language or library instead.

If you want to get started, read our guide on relational databases to understand tables and keys before writing your first queries.

FAQ

Is MySQL free to use?

Yes. You can download MySQL and use it without paying, and you may study or modify its source code. Commercial embedding in a product may need a separate commercial license from Oracle.

How do I pronounce MySQL?

The official pronunciation is "My Ess Que Ell". Many people say "my sequel", and that is accepted too.

Do I need to know SQL before using MySQL?

It helps. SQL is the standard language for reading and writing data in MySQL. Many libraries can write SQL for you, but learning basic statements makes debugging much easier.

Can MySQL run on my own laptop?

Yes. MySQL Server can run comfortably on a desktop or laptop alongside your other applications, and it needs little attention for everyday development work.

Sources

This page is based on the official documentation below. Read it for full detail.

MySQL — official documentation ↗
blozhikDeveloper news from across the web, explained. Every story links to its original sources.