This tutorial is going to show you how to install MariaDB 10.1.14 on CentOS 7 server and desktop. MariaDB 10.1.14 was released on May 10th, 2016. It’s a stable release with features that are not found in the previous 10.0 release. It also backported and reimplemented some features from MySQL 5.6 and 5.7.
highlights of MariaDB 10.1.14:
- XtraDB updated to XtraDB-5.6.29-76.2
- Innodb updated to InnoDB-5.6.30
- Performance Schema updated to 5.6.30
Install MariaDB 10.1.14 on CentOS 7
If you’ve installed an older version of MariaDB from CentOS repository before, then remove it with the following command:
sudo yum remove mariadb mariadb-server
Next, we’re going to add the official MariaDB repository. So create a repo file under
sudo nano /etc/yum.repos.d/mariadb.repo
And put the following text into the file.
#MariaDB 10.1 CentOS repository
#http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
Save and close this file. Then install MariaDB 10.1.14 with:
sudo yum install MariaDB-server MariaDB-client
The command will first update repository information and then install MariaDB 10.1.14. You can also notice that the program
galera will be installed and that’s because MariaDB Galera cluster is included in the MariaDB package starting from version 10.1.
After you press Y to begin the installation, yum will fetch the MariaDB signing key. The full key fingerprint is
1993 69E5 404B D5FC 7D2F E43B CBCB 082A 1BB9 43DB
Make sure you download the right key and then press Y to install MariaDB 10.1.14.
After it’s installed, start MariaDB with systemctl.
sudo systemctl start mariadb
systemctl status mariadb
● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/mariadb.service.d └─migrated-from-my.cnf-settings.conf Active: active (running) since 一 2016-06-06 00:45:08 EDT; 19s ago Main PID: 5674 (mysqld) Status: "Taking your SQL requests now..." CGroup: /system.slice/mariadb.service └─5674 /usr/sbin/mysqld
We can see that MariaDB server is running and auto start is enabled. If you see it’s disabled, then you can enable auto start with:
sudo systemctl enable mariadb
Check MariaDB version with this command:
Now run the post installation security script.
When it asks you to enter MariaDB root password, press enter because you have not set the root password yet. Then enter Y to set the root password for MariaDB server.
Next you can just press Enter to answer all the remaining questions. This will remove anonymous user, disable remote root login and remove test database. This step is a basic requirement for MariaDB database security in production.
Comments, questions or suggestions are always welcome. If you found this post useful, ? please share it with your friends on social media! Stay tuned for more tutorials.