How to install MariaDB?



MariaDB is an open-source database management system, commonly installed as part of the popular LEMP (Linux, Nginx, MySQL/MariaDB, PHP/Python/Perl) stack. It uses a relational database and SQL (Structured Query Language) to manage its data. MariaDB is a fork of MySQL managed by the original MySQL developers. It's designed as a replacement for MySQL, uses some commands that reference mysql, and is the default package on CentOS 7.

In this tutorial, we will explain how to install the latest version of MariaDB on a CentOS 7 server. If you specifically need MySQL, see the How to Install MySQL on CentOS 7 guide. If you're wondering about MySQL vs. MariaDB, MariaDB is the preferred package and should work seamlessly in place of MySQL.


To follow this tutorial, you will need:

A CentOS 7 with a non-root user with sudo privileges. You can learn more about how to set up a user with these privileges in the Initial Server Setup with...
0 0

Use promo code DOCS10 for $10 credit on a new account.

MariaDB is a fork of the popular cross-platform MySQL database management system and is considered a full drop-in replacement for MySQL. MariaDB was created by one of MySQL’s original developers in 2009 after MySQL was acquired by Oracle during the Sun Microsystems merger. Today MariaDB is maintained and developed by the MariaDB Foundation and community contributors with the intention of it remaining GNU GPL software.

MariaDB replaced MySQL as the default database system in the CentOS 7 repositories. Though installing MySQL into CentOS 7 is not difficult (see our MySQL CentOS 7 guide for instructions), if you simply need a database MariaDB is recommended for official support and a minimal chance of incompatibilities with other repository software.

This guide is written for a non-root user. Commands that require elevated privileges are prefixed with


. If you’re not familiar with the

0 0

MariaDB is a free and open source fork of the popular MySQL database management server software. It is developed under the GPLv2 (General Public License version 2) by the original developers of MySQL and is intended to remain open source.

It is designed to achieve high compatibility with MySQL. For starters, you can read MariaDB vs MySQL features for more information and importantly, it is used by big companies/organizations such as Wikipedia,, Google plus and many more.

In this article, we will show you how to install MariaDB 10.1 stable version in various Debian and Ubuntu distribution releases.

Install MariaDB in Debian and Ubuntu

1. Before installing MariaDB, you’ll have to import the repository key and add the MariaDB repository with the following commands:

On Debian 10(Sid)

$ sudo apt-get install software-properties-common $ sudo apt-key adv --recv-keys --keyserver 0xF1656F24C74CD1D8 $ sudo...
0 0

When deploying a web site or a web app, the most common web service solution for that is to setup a LAMP stack which consists of Linux, Apache, MySQL, and PHP.

In this article, we will learn how to setup an up-to-date LAMP stack by installing the latest stable releases of Apache 2.4.x, MariaDB 10.x, and PHP 7.x on Ubuntu 16.04.


Step 1: Install Apache 2.4.x

Install the latest stable release of Apache 2.4.x using the following command:

sudo apt-get install apache2 -y

Use the below command to confirm the installation:

apache2 -v

The output should resemble:

Server version: Apache/2.4.18 (Ubuntu) Server built: 2016-07-14T12:32:26

In a production environment, you will want to remove the default Ubuntu Apache welcome page:

sudo mv /var/www/html/index.html /var/www/html/index.html.bak

For security purposes, you should prevent Apache from exposing files and directories within the web root directory /var/www/html to...

0 0

MariaDB 10.3 stable version has been released on Oct 09, 2017. It is an enhanced, drop-in replacement for MySQL. MariaDB can be an better choice for choice for database professionals looking for a robust, scalable, and reliable SQL server. MariaDB has a number of updated features over MySQL. Use below links to read features comparison between MariaDB and MySQL. This article will help you to install MariaDB 10.3 in CentOS, RHEL 7/6 and Fedora Fedora 26/25/24 systems using yum.

Step 1: Add MariaDB Yum Repositories

First add MariaDB yum repository in our system. Create a new repo file /etc/yum.repos.d/mariadb.repo in your system and add below code as per your operating system and architecture.

For CentOS/RHEL – 7

[mariadb] name = MariaDB baseurl = gpgkey= gpgcheck=1

For CentOS/RHEL – 6

[mariadb] name = MariaDB baseurl =
0 0

MariaDB is a drop in replacement for MySQL and is an open source fork of MySQL created by the original MySQL developers. As of Red Hat Enterprise Linux (RHEL7) and CentOS 7 MariaDB is now the default SQL database, rather than MySQL which was the default in previous releases of the operating system.

Here we’re going to cover how to install and configure MariaDB.

Studying for your RHCE certification? Checkout our

RHCE video course over at Udemy

which is 20% off when you use the code ROOTUSERS.

Install MariaDB

MariaDB is available in the default RHEL/CentOS repository, though as is traditional with these operating systems the packages provided here will not be the most up to date version. For instance at the time of writing in August 2015 CentOS 7 will provide MariaDB 5.5.41 which was released in December 2014. The MariaDB repository provides the most up to date version, currently 5.5.45 which was released in August 2015. You can optionally...

0 0

WordPress has evolved from a specialized blogging platform into today's most widely used open source content management software (CMS), with thousands of third-party themes and plugins. WordPress was developed with MySQL as a back end, but because MariaDB is designed as a binary drop-in replacement of the original MySQL, you can replace MySQL with MariaDB for your WordPress installation and take advantage of its better performance, along with new features such as the two new database engines: XtraDB, which replaces InnoDB, and Aria, a crash-safe alternative for MyISAM.

To run your existing WordPress scripts with the new RDBMS, start by migrating your existing MySQL database system to MariaDB.

First, establish an SSH connection to your server. Stop the MySQL service with the command /etc/init.d/mysqld stop. You should see the confirmation Stopping mysqld: [ OK ].

Make sure you have backups of your databases before proceeding with any database service...

0 0

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at: MariaDB versus MySQL – Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.

Pre-Flight Check

These instructions are intended for installing MariaDB 5.5 on a single Ubuntu 14.04 LTS node (without MySQL already installed).I’ll be working from a Liquid Web Self Managed Ubuntu 14.04 LTS server, and I’ll be logged in as a non-root user, but with sudo access. For information on giving a user sudo access visit our page on How to Add a User and Grant Root Privileges on Ubuntu 14.04.

Step #1: Add the MariaDB Repository

The software-properties-common package should already be installed, but just in case:

sudo apt-get install...

0 0

In this article we shall learn about – how to install MariaDB 10.2 on Centos 7 / RHEL. This can be used as a guide for beginners or as a reference. Please note that, this can also be used as an alternative replacement of MySQL.

Features of MariaDB

MariaDB is an open-source and an alternative relational database management software. MariaDB is robust, fast and Scalable with rich storage engines. MariaDB has new features such as GIS and JSON.

Server Information and Packages

The Package included: MariadB, Mariadb-server,MariaDB-libs. The Daemon Name used is: mariadb. Port No: 3306. Configuration path: /etc/my.cnf.

Installing Maria DB 10.2 on Centos 7 / RHEL 7

In general, the mariaDB package comes with an installation media in the local repository which we can install, but if we needed to install the latest package we can do it by adding the repository to the yum local repository list. We use this below command and code to add the repository to the...

0 0

The second part of our LAMP tutorial series: how to install MySQL (or MariaDB) on an Ubuntu server.

This tutorial is intended for Ubuntu servers, the instructions should work on any LTS release of Ubuntu, including Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, even non-LTS releases like Ubuntu 17.10 and other Ubuntu-based distros. We tested this on an Ubuntu 16.04 server.

For the first part of our LAMP series, go to our How to Install and Optimize Apache on Ubuntu tutorial.

Before we begin installing MySQL/MariaDB

Some requirements and other notes:

MySQL and MariaDB are almost identical when it comes to basic usage in a LAMP stack. Most commands are the same, even the installation is similar. Choose one and install it for your LAMP stack, we’ll include instructions for both. You’ll need an Ubuntu server to run MySQL/MariaDB on. We recommend Vultr, they offer a $2.5 per month instance which is more than enough for a simple LAMP stack. You can compare...
0 0

Ubuntu 14.04 LTS
If you have MySQL already setup, you should remove it.

These steps allow you to preserve your existing MySQL databases. Just follow the MariaDB installation screens carefully.

(Remove MySQL) apt-get remove --purge mysql-server mysql-client mysql-common apt-get autoremove apt-get autoclean *** The above steps also remove phpMyAdmin and MySQLI (Install MariaDB and get phpMyAdmin and MySQLI back) apt-get install mariadb-server mariadb-client libmariadbclient-dev libmariadbd-dev phpmyadmin

You might not require the dev packages. Reconfigure phpMyAdmin to use SSL only by editing /etc/phpmyadmin/apache.conf.

At this point, most things will be working, but I had problems with my Dovecot install. So I installed the following packages as well:

apt-get install dovecot-mysql *fixed mail receipt but sending is still blocked. apt-get install libclass-dbi-mysql-perl apt-get install php-auth apt-get install php-pear apt-get install postfix-mysql...
0 0

In this tutorial we will show you how to install and configuration of MariaDB on your Ubuntu 16.04 server. For those of you who didn’t know, MariaDB is a an open source and cross-platform database engine and server, designed as a drop-in replacement for the well known and powerful MySQL database engine used on numerous web servers around the world. The application is geared toward database professionals that are in search of a scalable, robust, reliable and stable SQL server, a replacement for the MySQL database server.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation MariaDB on 16.04 LTS (Xenial Xerus) server.

Install MariaDB on Ubuntu 16.04

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the...

0 0

MariaDB is a fork of the most popular MySQL database management system. It is developed by MariaDB Corporation Ab, led by original developers of MySQL.

MariaDB is fully compatible with MySQL database management system and is now considered as a full drop-in replacement.

Install MariaDB on Debian 9

You can obtain MariaDB packages for Debian 9 from two ways.

Debian repository Official MariaDB mirror

Install MariaDB from Debian Repository

Installing MariaDB from Debian base repository is a straightforward way, but this may have bit old version of MariaDB.

sudo apt-get update sudo apt-get -y install mariadb-server mariadb-client

Use mysql_secure_installation to do the initial setup of MariaDB server.

sudo mysql_secure_installation

If you have installed MariaDB from base repository, users can not login to MariaDB as the MariaDB root user from their Unix logins (not applicable if they have sudo access)

Perform below steps to...

0 0

Linux Mint Tutorial – Hello everyone, today we will learn how to install MariaDB on Linux Mint 18. MariaDB is a fork of MySQL Server which is very popular among the database server around the world. Installing MariaDB on Linux Mint 18 is very easy. We will guide you step by step to install MariaDB on Linux Mint 18.

Steps to install MariaDB on Linux Mint 18

Step 1. Update System

sudo apt-get update && sudo apt-get upgrade

Step 2. Install and Configure MariaDB

dhani@dhani-Mint ~ $ sudo apt-get install mariadb-server [sudo] password for dhani: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient20 libterm-readkey-perl mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common mariadb-server-10.0 mariadb-server-core-10.0 mysql-common Suggested packages: libmldbm-perl libnet-daemon-perl libsql-statement-perl...
0 0

Warning: Switching from MySQL 5.7 to MariaDB 10.2 can corrupt database data and not recommended to perform on live server.

The steps below describe how to switch from MySQL 5.7 to MariaDB 10.2.

Connect to the server using SSH Create a backup of all databases:

# mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` --all-databases | gzip > /root/mysql.all.dump.sql.gz

Create a backup of Plesk databases:

# mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` --databases mysql psa apsc | gzip > /root/mysql.mysql-psa-apsc.dump.sql.gz

Configure MariaDB repository for version 10.2:

# apt-get install software-properties-common
# apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8
# add-apt-repository 'deb [arch=amd64,i386,ppc64el] xenial main'
# apt update

Install MariaDB server:

# apt install mariadb-server

Note: it will fail with error like:Unpacking...

0 0

MariaDB is a drop-in replacement for MySQL database server. Drop-in replacement means MariaDB works exactly like MySQL. When you remove MySQL server and install MariaDB, your applications using the database server won’t notice that change.

That’s because MariaDB is using the same core packages and services MySQL uses. The two big differences between the two software are licensing agreements and their owners.

You can read more about the two by researching online. When you’re ready to installing MariaDB, continue below.

Step 1: Update Ubuntu Servers

Before installing packages on Ubuntu systems, you must first update the server by fetching latest packages in Ubuntu repositories. Sometimes, if you don’t update, you may run into issues installing software.

To update Ubuntu systems, run the commands below.

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove

The commands above update Ubuntu and remove obsoletes...

0 0

MariaDB is an Open Source database Server & It is 100 % compatible with MySQL, drop-in replacement to MySQL database server.

Background of MariaDB :

In 2008, MySQL was acquired by Sun Microsystems, which was in turn acquired by Oracle Corporation in 2010. While the initial acquisition by Sun was hailed by many in the MySQL community as exactly what the project needed, that sentiment did not last, and the subsequent acquisition by Oracle was unfortunately met with far lower expectations. Many of MySQL’s developers left Sun and Oracle to work on new projects . Among them was Michael ‘Monty’ Widenius, creator of MySQL and one of the project’s longtime technical lead. Monty and his team created a fork (offshoot) of the MySQL code base and named his new DBMS MariaDB

In this Post we will discuss how to install MariaDB in Ubuntu Linux. By default mariadb packages are not included in Ubuntu Repositories. So to install mariadb , we we have set MariaDB...

0 0

MariaDB is a free and open source fork of well known MySQL database management server software, developed by the brains behind MySQL, it’s envisioned to remain free/open source.

In this tutorial, we will show you how to install MariaDB 10.1 stable version in the most widely used versions of RHEL/CentOS and Fedora distributions.

For your information, Red Hat Enterprise Linux/CentOS 7.0 switched from supporting MySQL to MariaDB as the default database management system.

Note that in this tutorial, we’ll assume your working on the server as root, otherwise, use the sudo command to run all the commands.

Step 1: Add MariaDB Yum Repository

1. Start by adding the MariaDB YUM repository file MariaDB.repo for RHEL/CentOS and Fedora systems.

# vi /etc/yum.repos.d/MariaDB.repo

Now add the following lines to your respective Linux distribution version as shown.

On CentOS 7

[mariadb] name = MariaDB baseurl =...
0 0

In a previous tutorial, we have showed you how to install MariaDB 10 in CentOS 7. In this guide, we will show you how to install and secure MariaDB 10.1 stable version in RHEL/CentOS 6 distributions.

Note that in this tutorial, we’ll assume your working on the server as root, otherwise, use the sudo command to run all the commands.

Step 1: Add MariaDB Yum Repository

1. First, add the MariaDB YUM repository entry for RHEL/CentOS 6 systems. Create the file /etc/yum.repos.d/MariaDB.repo.

# vi /etc/yum.repos.d/MariaDB.repo

Afterwards copy and paste the lines below into the file and save it.

On CentOS 6

[mariadb] name = MariaDB baseurl = gpgkey= gpgcheck=1


[mariadb] name = MariaDB baseurl = gpgkey= gpgcheck=1

Add MariaD Repository in CentOS 6

Step 2:...

0 0

MariaDB is a binary drop in replacement for MySQL database server. This means that for most cases, you can just uninstall MySQL and install MariaDB and you are good to go.

Why MariaDB?

MariaDB is totally open source version of MySQL It works just like MySQL and is compatible with MySQL setups Fedora and Red Hat/CentOS is moving to use MariaDB from Fedora 19/RHEL 7/CentOS 7 versions

This is guide, howto install or upgrade MariaDB 10.2.13 [stable] (10.1.31 [stable] or 10.3.5 [release candidate]) on Fedora 27/26/25, CentOS 7.4/6.9/5.11 and Red Hat (RHEL) 7.4/6.9/5.11. Installing MariaDB is almost same process than install MySQL.

Note: If you are moving from MySQL, then make sure that you backup (dump and copy) your database and configs. And if upgrading from earlier versions, then remember run mysql_upgrade command. And if you uninstall MySQL, then remember restore /etc/my.cnf after installation, like:

mv -vi /etc/my.cnf.rpmsave /etc/my.cnf


0 0

So... likely I'm an idiot, but I'm stuck. I just set up a CentOS 7 on Digial Ocean and I can't seem to get the MariaDB/MySQL server running.

Some output

[root@hostname ~]# yum list installed |grep maria mariadb.x86_64 1:5.5.37-1.el7_0 @updates mariadb-libs.x86_64 1:5.5.37-1.el7_0 @updates mariadb-server.x86_64 1:5.5.37-1.el7_0 @updates

So it's installed, can we at least see the client?

[root@hostname ~]# which mysql /bin/mysql

Let's try and start the server, just for fun

[root@hostname ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service Failed to issue method call: Unit mysqld.service failed to load: No such file or directory. [root@hostname ~]# mysqld -bash: mysqld: command not found [root@hostname ~]# mysql.server start -bash: mysql.server: command not found [root@hostname ~]#

And this is where I get lost. Looking at what is actually installed, there is no server/daemon

0 0
0 0