We’ll show you, how to install MariaDB on Ubuntu 16.04. MariaDB is a community-developed fork of MySQL. It is a free and open source, very fast, stable and scalable database server, which makes it one of the most used database servers in the world. It is an improved, drop-in replacement for popular MySQL Database Server. In this tutorial, we will show you how to install MariaDB on Ubuntu 16.04. Installing MariaDB on Ubuntu 16.04 is an easy task, and if you carefully follow the steps of this tutorial, you should have MariaDB installed on your Ubuntu 16.04 server in less than 10 minutes. Let’s get started.
Table of Contents
1. Connect to your server
First, you will need to login to your server via SSH as user root:
and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.
2. Update your system
Before we start, let’s make sure your system is up-to-date by running the following commands:
3. Installing MariaDB on Ubuntu 16.04
Before we start with the MariaDB Server installation, you will need to add the official MariaDB repository.
First, install the software-properties-common
package to your server with the following command:
Next, import the MariaDB GnuPG signing key to your system, by executing the following command:
And finally, add the MariaDB repository with:
To be able to initiate the MariaDB installation from the newly added repository, you will now need to update the package list with:
You can now install MariaDB on your server with:
Once the installation is complete, the MariaDB service will be started automatically. To verify if the service is running on your system, you can run the following command:
You should see the following output on your screen:
And to check the MariaDB version you can type:
4. Securing your MariaDB installation on Ubuntu 16.04
After the installation is complete, you can improve the security of your MariaDB server, by running the mysql_secure_installation
script, using the following command:
You will be asked to enter your current password for the MariaDB root user. If you did not set any password during the installation, you can just leave it blank and press Enter:
You can then choose to change your root password or leave it as it is.
After this, you will get asked a couple of more questions and it is recommended that you answer ‘yes’ to all of them:
Once you complete all the steps, the following output will be displayed on your screen:
5. Connect to MariaDB
Now after you are done with installing and securing MariaDB, you can type the following command to connect to your MariaDB server:
You will be asked for your MariaDB root password that has been set during the installation or during the mysql_secure_installation
script.
This will grant you access to the MariaDB shell:
And that’s it, with the completion of this step we are done installing MariaDB on Ubuntu 16.04.
Of course, you don’t have to install MariaDB on Ubuntu 16.04, if you use one of our MariaDB Hosting services, in which case you can simply ask our expert Linux admins to install and configure MariaDB on your Ubuntu 16.04 server. They are available 24×7 and will take care of the installation and configuration immediately.
PS. If you liked this post on Installing MariaDB on Ubuntu 16.04, please share it with your friends on the social networks using the buttons below or simply leave a reply. Thanks.
Awesome article. According to the instructions, I quickly did everything