Installing MariaDB in Ubuntu

On the test I will install MariaDB in Ubuntu 16.04.
First of all, let’s look at the required repository at https://downloads.mariadb.org/mariadb/repositories/
There is also an instruction for their addition.

Since I install in Ubuntu 16.04, the commands for adding the repository will be as follows:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.ehv.weppel.nl/mariadb/repo/10.2/ubuntu xenial main'
sudo apt-get update

After that, install MariaDB server and client:

sudo apt-get install mariadb-server mariadb-client

After installation, we will perform several security tips (remove the test base, disallow the root user remote access, etc.):

sudo mysql_secure_installation

You can connect to MariaDB server as follows:

sudo mysql -u root -p

To view the status, stop, start the MariaDB server, you can use the commands:

sudo systemctl status mariadb
sudo systemctl stop mariadb
sudo systemctl start mariadb

If you need to uninstall MariaDB, then do:

sudo apt-get autoremove mariadb-server mariadb-client
Подписаться на IT Blog (RU) по Email
Subscribe to IT Blog (EN) by Email

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a Reply