Skip to content


We looked at SQLite previously and then SQL. These are two useful skills to have, especially SQL, but SQLite isn't used much in highly available web applications, so we'll explore a very popular database engine called MySQL.

Client / Server based database#

Unlike SQLite, which stores everything in a single, flat file, MySQL is a client/server based database: you have a server that runs remotely or on a central system, and then you have multiple clients that connect to the server to run SQL queries and work with the data inside of the database.

MySQL operates on TCP port 3306.

Clients include the MySQL command line tools, libraries for many programming languages and more.


The SQL you were writing for the previous SQLite section will be mostly the same, but you'll have to do some research to ensure you're getting the syntax right for queries aimed at a MySQL based database.

We won't be doing that ourselves in this course, because the SQL you've learned is enough for you to understand some very basic concepts. As I've said previously, it's not likely you'll be writing a lot of SQL and managing the database at that level. In most organisations that falls to the software engineers as they understand the database they need based on the software they're designing.


A while back the MySQL database project was forked (copied) and a new copy called MariaDB was created. I believe MariaDB was created by the open-source community when Oracle Inc. obtained MySQL. MariaDB wanted to protect the code base from potential commercialisation, among other reasons, by Oracle Inc.

At the time of writing, MariaDB is mostly compatible with MySQL as it's designed to be a direct fork/clone. MariaDB does offer some advantages and has added improvements and new features over the years.

I mention MariaDB as you might come across is in the wild. It's gaining popularity.


Now let's install MySQL on our Ubuntu server so we can experiment with it.