What is MySQL (and MariaDB)?

Databases explained simply: what MySQL and MariaDB store, how tables, users and privileges work, and how a website uses them.

Guide2 min readLast updated
On this page
  1. What goes in a website’s database
  2. The structure
  3. Users and privileges
  4. On Traxio
  5. SQL
  6. Common questions

A database stores information in an organised way so an application can find, sort and update it quickly. MySQL and its close relative MariaDB are the most widely used databases for websites.

What goes in a website’s database

  • Posts, pages and products
  • User accounts and hashed passwords
  • Comments and orders
  • Settings

Uploaded images and the application’s code are files, not database content.

The structure

  • Database — a container for one application’s data, e.g. username_wp
  • Tables — like spreadsheets: posts, users, options
  • Rows — one record each
  • Columns — fields such as title or email

Users and privileges

An application connects with a database user and password. The user has privileges on specific databases. Give each application its own user with access only to its own database. Managing database users and privileges

On Traxio

SQL

Applications talk to databases in SQL:

SELECT title FROM posts WHERE status = 'published' ORDER BY created_at DESC LIMIT 5;

You don’t need to know SQL to run WordPress; it helps when troubleshooting.

Looking for somewhere to run PHP and MySQL? Traxio’s PHP and MySQL hosting includes phpMyAdmin.

New to Traxio? Hosting is £0.99 a month. See what’s included

Common questions

What is MySQL and why does my site need it?

MySQL is the database that stores everything your site does not keep in files — posts, pages, users, settings, orders. WordPress and most other applications keep their content there, which is why a backup of your files alone is not a complete backup.

This is a general web-hosting explanation, not specific to Traxio.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going