← Back to blog
bpdubuntu

Getting Started with MariaDB (MySQL) on Ubuntu Server

12 November 2025bpd · ubuntu

Set Up a Powerful and Secure SQL Database

The ‘Ubuntu System Administration Guide’ provides a practical guide to installing and securing MariaDB, a popular and fully open-source relational database that is a drop-in replacement for MySQL.

Installation and Security

After installing the server and client packages with `apt`, the book emphasizes the importance of running the `mysql_secure_installation` script. This interactive script walks you through essential security steps, including:

  • Setting a strong password for the ‘root’ user.
  • Removing anonymous users.
  • Disallowing remote root login.
  • Removing the test database.

Basic Database Management

The guide then shows you how to log into the MariaDB command-line client and perform fundamental tasks, such as viewing existing databases with `SHOW DATABASES;`, creating a new database with `CREATE DATABASE your_db_name;`, and deleting one with `DROP DATABASE your_db_name;`.


This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13