How to Install MariaDB on Ubuntu 18.04 Bionic Beaver

Install MariaDB on Ubuntu 18.04

In this article, we will have explained the necessary steps to install MariaDB on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

MariaDB is a free and open source fork of well known MySQL database management server software, developed by the brains behind MySQL, it’s envisioned to remain free/open source.

Install MariaDB on Ubuntu

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

Step 2. Installing MariaDB on Ubuntu 18.04.

Install MariaDB by issuing the following command:

Now confirm the installation by typing following:

After installing MariaDB in your system start it’s service using the following command:

Step 3. Securing MariaDB.

After installation, we have to improve MariaDB security by typing following:

Then enter yes/y to the following security questions:

To connect to the MariaDB server through the terminal we can use the MariaDB client. To log in to the MariaDB server as the root user type:

That’s all you need to do to install MariaDB on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.