Setting up MariaDB

Web apps, business websites, mail services, and numerous accounting systems are just a few of the services that employ . Today, we’ll talk about installing MariaDB, one of the most widely used DBMS.

We won’t discuss how to set up and configure a LAMP server in this article; that is addressed in a different topic (link to an article about LAMP).

should be mentioned that due to the availability of the and the ongoing of the project itself, MariaDB has supplanted MySQL as the server in the repository.

We add the repository because MariaDB 5.5 will be installed by the system.

Take into account this point separately for each OS.

You can skip this step if it’s convenient for you.

Open the page on the official website with details about the repositories and their settings if you still decide to do this.


Just prior to the installation, we will update the information that pertains to the repositories and package indexes:

sudo apt-get update

Bringing software and other system components up to date:

sudo apt-get upgrade

We do a system reboot whenever necessary, as it is occasionally required:

sudo reboot

Be sure to check the version of the MariaDB-server package that is available in the repository:

apt-cache show mariadb-server

For Ubuntu 16.04 the answer will be like this

For Ubuntu 18.04:

Let’s add some information about the repository to version 10.3 of this software. It is essential to note that different versions of Ubuntu have their own individual repositories.

For Ubuntu 16.04, run the following commands in turn:

sudo apt-get install software-properties-commonsudo apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8sudo add-apt-repository 'deb [arch=amd64,arm64,i386,ppc64el] xenial main'

For Ubuntu 18.04:

sudo apt-get install software-properties-commonsudo apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] bionic main'

Install new software and ensure that all relevant information about the contents of the repositories is up to date.

sudo apt-get updatesudo apt-get install mariadb-server

The Ubuntu installer will prompt you to enter the root password and confirm it, regardless of the version of Ubuntu you are using:


We are currently updating the components of the system, as well as the data pertaining to the repositories.

sudo yum update

Adding a repository for the stable version 10.3 of the software. To accomplish this, navigate to the directory that contains the repository files and create a file with the following name:

cd /etc/yum.repos.d/sudo touch MariaDB.repo

Using any editor, we append information taken from the official website to the file:

# MariaDB 10.3 CentOS repository list - created 2019-05-07 06:43 UTC
name = MariaDB
baseurl =

Installing the package:

sudo yum install MariaDB-server MariaDB-client

The yum program will compile all of the essential information for the installation, and it will watch for input from the user.

Press Enter after selecting “y” as your response to the inquiry. It’s possible that the number of packages you install will change.

The command should be rerun if the following error occurs:

Error downloading packages:
  MariaDB-compat-10.3.14-1.el7.centos.x86_64: [Errno 256] No more mirrors to try.
  MariaDB-client-10.3.14-1.el7.centos.x86_64: [Errno 256] No more mirrors to try.
  MariaDB-common-10.3.14-1.el7.centos.x86_64: [Errno 256] No more mirrors to try.

After installation, start the server:

sudo service mysql start


The majority of apps are typically installed with their default settings. It is advised that you maximize the settings of your computer, regardless of the distribution you are using.

sudo mysql_secure_installation

Yes, “mysql”, because the MariaDB project “left” from MySQL.

At the very outset of its execution, the software will inquire about a password for the root user. If there is no password set, then you must press the Enter button. The response “y” is appropriate for most of the questions. Following are the questions, along with their respective translations:

Change the root password? [Y/n]Change root user password?
Remove anonymous users? [Y/n]Remove anonymous users?
Disallow root login remotely? [Y/n]Deny connection as root?
Remove test database and access to it? [Y/n]Delete test database and access to it?
Reload privilege tables now? [Y/n]Reload privilege table now?

Checking the Server Status

It is recommended, but not always required, to check the current status of the server. The following command may be used to carry out this operation:

sudo service mysql status

wp-content/uploads/2020/06/7_6." alt="" />

It is important to note that if the server is not already running, then the following command must be used in order to manually start it:

sudo service mysql start

Checking the connection to the DBMS

Connecting to the DBMS is done with the following command:

mysql -u -p

Connecting as root is the proper course of action if this is the very first connection and no other users have been created.

mysql -u root -p

After that, if the root user’s password was not previously set, you will need to enter it now before pressing the Enter key.

Exit command:



Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!