25th Anniversary Savings | 25% Off Dedicated Servers*Shop Now
25th Anniversary Savings | 25% Off VPS Hosting* †††Shop Now
Limited Inventory: High-Performance AMD-Powered Servers Now Available.* Shop Now >
Dedicated Hosting Deals | From $99/moShop Now

How To Install MySQL / MariaDB on CentOS 7

Posted on by J. Mays
Reading Time: < 1 minute

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, in MariaDB Version 10), XtraDB (drop-in replacement for InnoDB), and OQGRAPH (in MariaDB Version 10).

Preflight Check

  • These instructions are intended for installing MariaDB on a single CentOS 7 node.
  • I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as root.

Install MySQL / MariaDB

Installing MariaDB is as simple as running just one command:

yum -y install mariadb-server mariadb

And then start MySQL, now MariaDB:

systemctl start mariadb

Be sure that MySQL/MariaDB starts at boot:

systemctl enable mariadb

To check the status of MySQL/MariaDB:

systemctl status mariadb

To top MySQL/MariaDB:

systemctl stop mariadb

Check the installation with the command client:

mysql

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.40-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>

About the Author: J. Mays

As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!

Latest Articles

How to Edit the PHP Memory for Your WordPress Site via WP Toolkit

Read Article

What is CGI-Bin and What Does it Do?

Read Article

Top 10 Password Security Standards

Read Article

Top 10 Password Security Standards

Read Article

How to Use the WP Toolkit to Secure and Update WordPress

Read Article