How To Install MariaDB On Ubuntu 18.04

How To Install MariaDB On Ubuntu 18.04

MariaDB Database is a free and open-source database management system that is a distribution of MySQL, and this is a developed project led by the main developers of MySQL. MariaDB is currently used in huge and well-known companies such as Google, Craigslist, Wikipedia, Archlinux, RedHat, CentOS, and Fedora and is very popular on the Linux operating system.

Mari DB is written in C ++, Perl, and Bash and supported in Microsoft Windows, Linux, OS X, FreeBSD, OpenBSD, Solaris operating systems.

In short, MariaDB can be called the optimized version of Mysql because it is much more efficient in performance and also has better security, and is faster in responding to queries. Those who host a large number of websites will really like this database. Usually, sites that work well with Mysql 5.6 and above will work well with Maria DB too.

And there is no need to worry about incompatibility issues after upgrading to MariaDB, and you can safely do so.

In this article, we are going to explain how to install the MariaDB database on Ubuntu 18.04. You can run this database on an online Linux VPS and access it from anywhere!

Install MariaDB On Ubuntu 18

First, we install the MariaDB database with the following command.

sudo apt install mariadb-server mariadb-client

After installation, MariaDB services should start automatically. To make sure it is up and running, check its status as below.

sudo systemctl status mysql

MariaDB has no security by default; you need to run the security script below to secure it. You will be asked to set the root password to ensure that not everyone can log in to the MariaDB database.

sudo mysql_secure_installation

MariaDB On Ubuntu18

When you run the script, it will ask you to enter the current root password. (do not enter anything and press Enter).

Then enter yes / y to answer the security questions below.

Set a root password? [Y/n]: y 
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y 
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y 
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y 
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

Leave a Reply

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