Install MariaDB 10.4 on Ubuntu

In this tutorial we ae going to install MariaDB on Ubuntu 18.04 machine

 

Our Recommended Template : Ubuntu 18.04

 

Step 1: Use the below command to install MariaDB

 sudo apt -y install mariadb-server mariadb-client

Step 2: Enable and Start MariaDb to run on startup

systemctl enable mariadb

systemctl start mariadb

Step 3: Secure MariaDB by running mysql_secure_installation.

mysql_secure_installation

 

Step 4: log in to MariaDB as the root user and Creating Database

mysql -u root -p

When prompted, enter the root password you assigned when the mysql_secure_installation script was run.

You’ll then be presented with a welcome header and the MariaDB prompt as shown below:

MariaDB [(none)]>

Use the below command to create a database
(Here the database name is “nextdb” you can use your preferred name)

create database nextdb;
grant all on nextdb.* to '<username>' identified by '<password>;