How to install MariaDB 10.4 on Ubuntu 18.04?

Windows Articles

Ubuntu Rolling Release? It is possible with Rolling Rhino

Throughout the Linux community, there are always expectations about when Ubuntu decides to have a Rolling Release. This, at least, since the...

How to recover files deleted with Windows File Recovery

Hello! Deleting files by accident is one of the biggest fears of users. Indeed, unintentionally deleting documents, music or photos can be...

How to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10?

This is a short post in which I will show you how to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10...

Linuxfx is a Windows 10 clone based on Ubuntu.

Hi! Most Windows users are afraid to switch to Linux for various reasons. However, the biggest one is the difference in the...

How to install OpenMeetings on Ubuntu 20.04 / 18.04?

If there is one thing the Internet has completely revolutionized, it is long-distance communications. And with it the business meetings that thanks to many...
angeloma
angeloma
Senior Writer and partner

Debian and Ubuntu are some of the most stable Linux distributions out there. This is because the packages that are part of the official repositories are frozen and tested many times by many people. However, this brings a consequence: that we will not be able to have the most recent versions of the programs. An example of this is MariaDB which is a vital program for many people. So, today I will show you how to install MariaDB 10.4 on Ubuntu 18.04.

MariaDB is a well-known archi Database Relationships Management System that is a MySQL fork. This is due to the purchase of Sun Mycrosystem by Oracle. It is perfectly compatible with MySQL and is available in most Linux distributions.

In Ubuntu 18.04 LTS the version of MariaDB that is available in the official repositories is 10.1, but recently has seen the release of version 10.4 with some interesting new features. Some of them are:

  • The unix_socket authentication plugin is now default on Unix-like systems. This represents a considerable improvement in authentication security.
  • The obsolete mysql.host table is no longer created
  • User password expiry. This forces you to change it periodically.
  • User accounts and global privileges are now stored in the mysql.global_priv table.

And many other news related to the creation of cLuster and Galera 4. If you want to know them, I recommend you to read the changes and improvements of version 10.4.

So, using this version on our Ubuntu 18.04 is a good idea.

Installing MariaDB 10.4 on Ubuntu 18.04

The first step is to install some necessary packages. So open a new terminal session and run the following command:

:~$ sudo apt-get install software-properties-common

The easiest way to install MariaDB on Ubuntu 18.04 is through the application repositories. To do this you have to add the GPG key of the repositories:

:~$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

1.- Adding the GPG key for the repository
1.- Adding the GPG key for the repository

At the end, we will be able to add the repository itself.

:~$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu bionic main'.

Next, the APT cache needs to be refreshed to recognize the new repository:

:~$ sudo apt update

Now, we can install MariaDB 10.4. To do this, use the following command:

:~$ sudo apt install mariadb-server

2.- Installing MariaDB 10.4 on Debian 10
2.- Installing MariaDB 10.4 on Debian 10

If you have it installed, just update the distribution:

:~$ sudo apt upgrade

With MariaDB installed, the first step is to define a root password and secure the installation:

:~$ sudo mysql_secure_installation

3.- Securing the MariaDB installation
3.- Securing the MariaDB installation

And finally check the installed version:

:~$ mysql --version

4.- MariaDB version
4.- MariaDB version

Now you can work with MariaDB. That is it.

Conclusion

MariaDB 10.4 is a good improvement over previous versions. But it is not always available in the official repositories of other Linux distributions. Today you have learned how to install it in Ubuntu 18.04.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Ubuntu Rolling Release? It is possible with Rolling Rhino

Throughout the Linux community, there are always expectations about when Ubuntu decides to have a Rolling Release. This, at least, since the...

How to recover files deleted with Windows File Recovery

Hello! Deleting files by accident is one of the biggest fears of users. Indeed, unintentionally deleting documents, music or photos can be...

How to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10?

This is a short post in which I will show you how to install Vivaldi Web Browser on Ubuntu 20.04 / 19.10...

Linuxfx is a Windows 10 clone based on Ubuntu.

Hi! Most Windows users are afraid to switch to Linux for various reasons. However, the biggest one is the difference in the...

How to install OpenMeetings on Ubuntu 20.04 / 18.04?

If there is one thing the Internet has completely revolutionized, it is long-distance communications. And with it the business meetings that thanks to many...