For those wanting to install MariaDB 10.2 or 10.3 on Ubuntu 16.04 LTS, the steps below are a good starting point. Ubuntu 16.04 LTS has upgraded to MariaDB 10.1. You won’t be able to upgrade via Ubuntu default repository, at least not yet. To upgrade to the latest, you must add its default repository and the steps below show you how. When you’re ready to install MariaDB latest, follow the steps below:

Adding MariaDB repository on Ubuntu

First, make sure the software-properties-common package is installed. Just in case it’s not, run the commands below. Next, run the commands below to import MariaDB repository public key used by the package management system. Finally, run the commands below to add MariaDB 10.1 repository to your Ubuntu machine. The above commands add MariaDB 10.1 repository to Ubuntu with the latest packages. Remember to change the highlighted version number to the current latest. To install MariaDB 10.2, run the commands below At the time of this writing, the latest current version was 10.2. The latest alpha version was 10.3 It’s recommended to upgrade to 10.1 before moving to 10.2 and up.

Installing MariaDB latest on Ubuntu

Now that the MariaDB 10.1 repository has been added to Ubuntu, run the guides below to install the current version. First, run the commands below to update your Ubuntu machines. Next, run the commands below to install the MariaDB server and client. Doing the installation, you may be prompted to create and confirm a new password for the MariaDB root user. Please enter and confirm a password. You’ll need this password to manage the database server. After that, MariaDB will be fully installed on your machine. To secure the MariaDB database server, run the commands below: When you run the above command, you’ll be prompted to create a root password, remove anonymous users, disable remote root access and delete the test database. Follow this guide below in answering the questions:

Enter current password for root (enter for none): Enter current password. Change root password? N Remove anonymous users? Y Disallow root login remotely? Y Remove test database and access to it? Y Reload privilege tables now? Y

When you’re done, restart MariaDB and you’re done. That’s it! To verify the MariaDB version, run the command below That’s it! You may also like the post below: