|

What is MySQL? Guide to the World’s Favourite Database

The definitive guide to MySQL for a UK audience. We explain what a database is, how SQL works, and why it’s the engine behind your favourite sites.

This post may contain affiliate links. If you make a purchase through these links, we may earn a commission at no additional cost to you.

Picture this: it’s a dreary Tuesday morning, and you’re booking a train ticket to Manchester on your phone. You filter by the cheapest fare, select a seat, and pay. A few seconds later, a ticket pops into your app. It’s a beautifully simple process, one we take for granted every day. But behind that seamless experience, deep within the digital plumbing of the website or app, a powerful, unseen engine is working tirelessly. It’s finding the right train times, checking seat availability, and storing your ticket details securely.

In many cases, that engine is called MySQL.

If you’ve ever browsed a website, bought something online, or even just liked a photo on social media, you’ve almost certainly used MySQL without knowing it. It’s the world’s most popular open-source database, a foundational piece of technology that powers a massive chunk of the internet, from tiny blogs to gigantic companies like Facebook and YouTube.

But what on earth is it? The name sounds a bit technical, a bit nerdy, maybe even a little intimidating. Don’t worry. The goal of this guide is to completely demystify MySQL. We’ll break it down from the ground up, explaining what it is, why it matters so much, and how it quietly runs the digital world we in Britain use every single day. Forget the jargon; let’s get to grips with the boss of the data world.

So, What Exactly Is a Database? Let’s Start with the Basics

Before we can understand MySQL, we need to know what a database is. It’s a word we hear all the time, but the concept is actually very simple.

Think of It Like a Super-Smart Filing Cabinet

At its heart, a database is just a highly organised collection of information, or data. Imagine a massive, super-efficient digital filing cabinet. Instead of paper files, it stores information electronically on a computer. But it’s much cleverer than a regular cabinet. It’s designed to let you store, find, update, and manage huge amounts of information incredibly quickly and accurately.

Think about your local GP’s surgery. They have records for thousands of patients. Each record contains a name, address, date of birth, medical history, and so on. A long time ago, this would have all been stored in bulky filing cabinets. Finding a specific patient’s file could take ages, and if two doctors needed the same file at once, you’d have a problem.

A database solves this. All the patient records are stored digitally. A doctor can search for a patient by name or NHS number and get their entire history in seconds. Multiple doctors can view records at the same time. And the information is stored in a structured, consistent way, which makes it reliable. That, in a nutshell, is what a database does: it brings order to chaos.

Bits and Bobs: Tables, Rows, and Columns

To keep things tidy, databases organise information into tables. You can think of a table as a single drawer in our filing cabinet, dedicated to one specific type of information. For example, a school might have a ‘Students’ table, a ‘Teachers’ table, and a ‘Courses’ table.

Each table is then structured like a simple spreadsheet, with columns and rows.

  • Columns are the vertical headers that define what kind of information is in the table. In our ‘Students’ table, the columns might be ‘StudentID’, ‘FirstName’, ‘LastName’, and ‘Postcode’.
  • Rows are the horizontal records that contain the actual information for a single item. Each row is one student. So, one row might contain ‘101’, ‘David’, ‘Jones’, and ‘SW1A 0AA’.

Here’s a simple example of a table you might find in a database for a local football league:

TeamIDTeamNameHomeGroundFounded
1Rovers FCThe Community Pitch1998
2City UnitedRiverside Stadium1975
3AFC WanderersNorthwood Park2003

This structure is simple, logical, and incredibly powerful. By organising data this way, we can easily search, sort, and manage it, even if we have millions of rows.

Enter MySQL: The Boss of the Filing Cabinet

Now that we understand what a database is, where does MySQL fit in?

If the database is the filing cabinet, MySQL is the super-efficient office manager or librarian. It’s the software that actually manages the whole system. Its official title is a Relational Database Management System (RDBMS). That’s a mouthful, but it just means it’s a program that lets you create, manage, and interact with databases.

What Does MySQL Actually Do?

MySQL handles all the heavy lifting. You don’t interact with the raw data files directly. Instead, you give instructions to MySQL, and it does the work for you. Its key jobs include:

  • Storing Data: It takes the information you give it and stores it neatly in the right tables.
  • Retrieving Data: It can find and fetch any piece of information you ask for, almost instantly.
  • Updating Data: If you need to change something (like a customer’s address), MySQL makes sure it’s updated correctly everywhere.
  • Managing Access: It controls who can see or change the data, which is vital for security. For example, it can let a shop manager see sales figures but prevent a regular cashier from accessing them.
  • Ensuring Integrity: It makes sure the data follows the rules you set, preventing silly mistakes like entering a date of birth in the ‘Postcode’ column.

Why ‘Relational’? It’s All About Connections

The ‘R’ in RDBMS stands for Relational. This is the cleverest part. It means the tables in the database can be linked, or related, to each other. This is incredibly useful because it avoids having to repeat information.

Let’s go back to our school example. We have a ‘Students’ table and a ‘Courses’ table. Instead of cramming all the course information into the ‘Students’ table, we can create a third table called ‘Enrolments’. This table simply links a ‘StudentID’ from the Students table to a ‘CourseID’ from the Courses table.

It’s like your National Insurance number. That single number links you to all sorts of different records held by HMRC and the DWP. You don’t have to write your full life story on every single form; the number does the connecting for you. In a database, this is done with keys. A primary key is a unique identifier for a row in a table (like ‘StudentID’). A foreign key is a field in one table that refers to the primary key in another table. This system of linking tables is what makes relational databases so powerful and efficient.

SQL: The Language We Use to Talk to MySQL

So, how do we give instructions to MySQL? We use a special language called SQL (Structured Query Language).

Despite the technical-sounding name, SQL is surprisingly easy to learn. It’s designed to read a bit like plain English. You write simple commands, called queries, to tell the database what you want to do.

Let’s say we wanted to find the names of all the students who live in Manchester from a ‘students’ table. The SQL query would look something like this:

-- This query selects the first name and last name from the students table
-- for every student whose city is 'Manchester'.
SELECT FirstName, LastName 
FROM students 
WHERE City = 'Manchester';

Or if we wanted to add a new product to our online shop’s ‘products’ table:

-- This query adds a new row to the products table for a classic British biscuit.
INSERT INTO products (ProductName, Price, StockLevel) 
VALUES ('Jammie Dodgers', 1.10, 200);

These simple commands are the foundation of how almost every website and application interacts with its data. Every time you log in to a website, perform a search, or make a purchase, a little SQL query is almost certainly running in the background.

A Quick Trip Through Time: The Story of MySQL

MySQL wasn’t born in a giant tech corporation in Silicon Valley. Its story starts in the mid-1990s in Sweden, with two developers named Michael “Monty” Widenius and David Axmark.

From Sweden with Love

Monty and his colleagues were working on a web project and needed a database. The commercial options available, like Oracle, were incredibly expensive and too complicated for their needs. They wanted something fast, reliable, and simple. So, they decided to build their own.

They took an old data storage tool they had and bolted on an SQL interpreter. The result was the first version of MySQL. As for the name? It’s a lovely, simple story. Monty’s daughter was named My, so he combined her name with SQL to create MySQL.

The Open-Source Revolution

Crucially, Monty and David made a decision that would change everything: they released MySQL as open-source software.

This means the source code—the underlying recipe for the program—is made available for free. Anyone can download it, use it, modify it, and share it. You don’t have to pay any licensing fees. This was a radical idea at a time when big companies guarded their software secrets closely.

This decision was a stroke of genius. The internet was just starting to boom, and thousands of developers and small businesses needed a cheap, reliable database to build their websites. MySQL was the perfect solution. A community of users sprang up around the world, all using the software, finding bugs, suggesting improvements, and helping it grow.

Growing Pains and a Big-Name Buyer

MySQL’s popularity exploded. By the early 2000s, it was the default choice for web development. In 2008, the company behind MySQL was bought by Sun Microsystems, a major tech player. Then, in a move that sent ripples of concern through the open-source community, Sun was acquired by the database giant Oracle in 2010.

Many feared that Oracle, which sold its own very expensive database software, might kill off or neglect the free, open-source MySQL. In response, Monty Widenius, the original creator, “forked” the code—meaning he took a copy of the open-source project and started a new, separate one—to create a competitor called MariaDB. This was to ensure there would always be a truly community-driven version available.

However, to their credit, Oracle has continued to develop and support MySQL, which remains free and open-source, alongside offering paid commercial versions with extra features and support. Today, it is more popular and widely used than ever.

How MySQL Works Under the Bonnet

We don’t need to get too technical, but it’s useful to understand a couple of core concepts about how MySQL operates.

The Client-Server Model Explained

MySQL works on a client-server model. This sounds complicated, but we use this model all the time. Think about ordering food at a restaurant.

  • The Client: You are the client. You decide what you want (e.g., a burger and chips) and make a request to the waiter. In the digital world, the client is the application or software that needs the data (e.g., a website, a mobile app, or a data analysis tool).
  • The Server: The kitchen is the server. It receives your order, does all the work of preparing the food, and then sends it back out. The MySQL server is a powerful program that runs on a computer (either in your office or in a data centre somewhere). It listens for requests from clients, processes them, and sends the requested data back.

This model is great because the powerful server can handle requests from many different clients at the same time, just as one kitchen can serve a whole restaurant full of customers.

Storage Engines: The Real Workhorses

One of the unique features of MySQL is that it uses pluggable storage engines. Think of a storage engine as a specialist worker inside the database. MySQL can use different engines depending on the specific job it needs to do. It’s like having a toolbox with different types of hammers.

The two most common storage engines are InnoDB and MyISAM.

  • InnoDB: This is the default and most widely used engine. It’s a brilliant all-rounder, but its speciality is reliability and consistency. It supports something called ACID compliance, which is a fancy way of saying it’s very careful with your data. It ensures that transactions (like transferring money from one bank account to another) are either completed perfectly or not at all. You never end up in a weird half-finished state. Analogy: InnoDB is like a meticulous accountant who double-checks every single entry to make sure the books are perfectly balanced. This makes it ideal for e-commerce, banking, and any application where data accuracy is absolutely critical.
  • MyISAM: This was the old default engine. MyISAM’s main strength is speed, especially for applications that do a lot more reading of data than writing it. It’s less strict than InnoDB and doesn’t support the same level of transaction safety. Analogy: MyISAM is like a speedy warehouse worker whose job is to fetch items off the shelves as fast as possible. They’re less concerned with the complex paperwork of booking items in and out. This makes it a good choice for things like blogs or online magazines, where lots of people are reading articles but very few are writing them.

Why is MySQL So Ridiculously Popular? The LAMP Stack

One of the biggest reasons for MySQL’s world domination is its role as the ‘M’ in the legendary LAMP stack.

The Dream Team of Web Development

In the early days of the web, developers figured out a winning combination of four open-source technologies that worked together perfectly to build dynamic websites (websites that do more than just display static text). This toolkit became known as the LAMP stack:

  • L for Linux: The free, open-source operating system that runs the server.
  • A for Apache: The web server software that handles requests from your browser and serves up web pages.
  • M for MySQL: The database for storing all the website’s data.
  • P for PHP (or Python/Perl): The programming language used to write the website’s logic.

Analogy: The LAMP stack was like the ultimate flat-pack furniture kit for building a website. All the parts were free, they were designed to fit together perfectly, and a massive community was on hand to help you if you got stuck. This combination powered the explosion of the web, allowing developers to build complex, data-driven applications quickly and cheaply.

Powering the Giants (and the Small Fry)

The LAMP stack, with MySQL at its core, was the foundation for some of the biggest names on the internet. Facebook, Twitter, and YouTube all used MySQL in their early days to manage billions of pieces of user data.

But it’s not just for giants. The most popular Content Management System (CMS) in the world, WordPress, runs on the LAMP stack. It is estimated that WordPress powers over 40% of all websites on the internet. Every time you read a blog post, browse a small business website, or check the menu for your local pub online, there’s a very good chance that WordPress and MySQL are working away in the background.

MySQL in the UK Today: From Government to Gaming

The impact of MySQL is just as profound here in the UK. Its reliability, low cost, and flexibility make it a go-to choice for all sorts of organisations.

Powering Public Services

Government bodies need to manage vast amounts of data securely and cost-effectively. Open-source tools like MySQL are a perfect fit. While they don’t shout about their specific tech choices, job adverts and technical blogs show that platforms like GOV.UK and services within the NHS rely on MySQL to manage information and deliver digital services to millions of British citizens. It’s a quiet but crucial part of our national digital infrastructure.

The Backbone of British E-Commerce

Every time you shop online, a database is running the show. It manages product catalogues, tracks stock levels, stores customer details, and processes orders. Many British online retailers, from household names like Trainline to countless smaller businesses built on platforms like Magento or WooCommerce, use MySQL as their digital stockroom. It keeps the shelves organised and the checkouts running smoothly, 24/7.

A Skill in High Demand

For anyone considering a career in technology in the UK, understanding MySQL and SQL is a fantastic skill to have. Job sites are flooded with roles for web developers, software engineers, data analysts, and systems administrators, and nearly all of them list SQL proficiency as a key requirement. Learning it is a gateway to a huge number of well-paid, in-demand jobs in Britain’s thriving tech sector.

Getting Your Hands Dirty: A Few Practical Tips

If this has sparked your interest, you might be wondering how to get started.

Is It Hard to Learn?

The good news is that the basics of SQL are very beginner-friendly. Because the commands are so logical and English-like, most people can pick up the fundamentals—selecting, inserting, updating, and deleting data—in just a few hours. Like any skill, mastering it takes time, but the barrier to entry is surprisingly low. There are thousands of free tutorials online to get you started.

Common Pitfalls to Avoid

If you do start building things with MySQL, there are a couple of things to be aware of. The biggest one is security. One common type of attack is called SQL Injection. This is where a hacker cleverly types malicious SQL code into a form on a website (like a search bar or login field). If the website isn’t built properly, it might accidentally run this malicious code on its database, potentially revealing or deleting sensitive information. Good developers know how to prevent this, but it’s a constant threat. The other key thing is always, always back up your data!

Choosing Between MySQL and Its Rivals (like PostgreSQL)

MySQL isn’t the only database in town. Its biggest open-source rival is PostgreSQL (often just called “Postgres”). People often debate which one is better, but the truth is they are both excellent.

  • MySQL is often praised for its simplicity, speed, and ease of use. It’s incredibly well-supported and has a massive community, making it easy to find help. It’s a fantastic choice for web applications and content management.
  • PostgreSQL is generally considered more powerful and feature-rich. It’s often favoured for large, complex data analysis, scientific computing, and applications that require very complex queries.

Analogy: It’s a bit like choosing between a Ford Focus and a Land Rover Discovery. The Focus (MySQL) is a brilliant, reliable, and efficient car that’s perfect for most people’s everyday needs. The Discovery (PostgreSQL) is a powerful, rugged vehicle with more advanced features, perfect for tackling really tough terrain. You choose the one that’s right for the job.

The Future of MySQL

Technology moves at a blistering pace, so what does the future hold for a database that’s been around for over 25 years?

MySQL in the Cloud

The biggest shift in recent years has been the move to cloud computing. Instead of buying and managing your own physical servers, you can now rent computing power from huge providers like Amazon Web Services (AWS), Google Cloud, and Microsoft Azure.

All of these cloud giants offer “managed MySQL” services. This means you can have a powerful, secure, and scalable MySQL database up and running in minutes, without any of the hassle of setting it up or maintaining it yourself. They handle the backups, security updates, and performance for you. This has made MySQL even more accessible and is a huge part of its continuing growth.

Beyond Relational: The Rise of NoSQL

In the last decade, a new type of database has emerged: NoSQL. These databases don’t use the rigid table structure of relational systems. Instead, they are better at handling massive amounts of unstructured data—things like social media posts, sensor data, or user comments.

For a while, some people predicted that NoSQL would kill off traditional databases like MySQL. But that hasn’t happened. Instead, we’ve realised that they are just different tools for different jobs. NoSQL is great for “big data” problems, but for the vast majority of business applications that rely on structured, consistent data—customer records, product inventories, financial transactions—relational databases like MySQL are still the undisputed king.

Conclusion: The Quiet Achiever of the Digital World

MySQL is one of the great unsung heroes of the modern world. It’s not flashy or glamorous. It doesn’t have a slick user interface. Most people will never even see it. But it is a workhorse. It’s the quiet achiever that sits in the background, reliably managing the data that fuels our digital lives.

From its humble open-source beginnings in Sweden, it has grown into a global powerhouse. It’s the engine behind millions of websites, the backbone of online businesses, and a crucial piece of the apps and services we use every day. It’s powerful, it’s reliable, and, best of all, it’s free for anyone to use.

So next time you book a flight, order a takeaway, or read the news online, spare a thought for the clever, organised filing cabinet and its super-efficient manager, MySQL, working away silently behind the scenes to make it all happen.

Further Reading

For those interested in diving deeper, here are some of the most respected resources available:

Want More Like This? Try These Next: