How to Install MariaDB on Ubuntu 24.04: Easy Guide

Want to install MariaDB on your Noble Numat Ubuntu 24.04? Let’s roll in!

Installing MariaDB on (Noble Numbat) Ubuntu 24.04

MariaDB is an open-source RDBMS, available for major Linux distributions, including Ubuntu

Let’s install it on Noble Numbat Ubuntu 24.04:

Step 1: Update the System Packages

Firstly, update the system with:

sudo apt update
updating system packages on ubuntu 24.04

Move ahead!

Step 2: Installing MariaDB Server

Next, you need to install the MariaDB server via:

sudo apt install mariadb-server
installing mariadb server on ubuntu 24.04

Next comes the configurational steps.

Step 3: Configure Server

Now, configure the desired security measures to restrict unauthorized access to the server:

sudo mysql_secure_installation
running installation script on ubuntu 24.04

Change the root password, if your account is not yet protected. Remove the anonymous users and disallow the remote root login:

removing anonymous users from mariadb server on ubuntu 24.04

Remove the test database if required and reload the privileges table:

granting privileges to mariadb server on ubuntu 24.04

Step 4: Log in to MariaDB Shell

Lastly, to validate the MariaDB installation, log into its shell through the command:

sudo mysql -u root -p
log in to mysql in ubuntu 24.04

How to Upgrade MariaDB on Ubuntu 24.04?

For upgrading MariaDB, run:

sudo mariadb-upgrade
upgrading mariadb on ubuntu 24.04

Uninstalling MariaDB from Ubuntu 24.04

To remove MariaDB, execute the provided command:

sudo apt autoremove mariadb-server mariadb-client --purge -y 
removing mariadb from ubuntu 24.04

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top