How to Install MariaDB on Ubuntu 18.04

Reading Time: < 1 minute

MariaDB is a drop in replacement for MySQL, and its popularity makes for several other applications to work in conjunction with it. If you’re interested in a MariaDB server without the maintenance, then check out our high-availability platform. Otherwise, we’ll be installing MariaDB 10 onto our Liquid Web Ubuntu server, let’s get started!

Installing MariaDB 10 on Ubuntu 18.04

Step 1: Update and Upgrade the apt tool to ensure we are working with the latest and greatest.

sudo apt update && upgrade

Step 2: Install MariaDB

apt install mariadb-server

Step 3: Secure MariaDB with the command below, you’ll be asked to enter in several details including MariaDB’s password, keep this handy as you’ll likely need it in the future.

mysql_secure_installation

Output:

Enter current password for root (enter for none):Enter
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n]Y
Disallow root login remotely? [Y/n]Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n]Y

Author Bio

About the Author: Echo Diaz

Throughout Echo's four year stint as a technical support specialist, her passion for breaking down complex concepts has to lead to a career in professional writing. As a top tier support specialist, she adds a distinctive element to her written work that speaks to customer feedback and concerns.

Echo occasionally pops her head out from behind her computer to watch her dog energetically run around the yard and unabashedly shovels money into buying tickets to see her favorite musical artists.

Get 33% off the first 3 months on a new VPS! Find out why 30,000 customers have chosen our Best-in-Class Performance & 24x7x365 Support