How to install MariaDB on CentOS
Published: 08 September 2016
Filed Under: CentOS
MariaDB is the community fork and drop-in replacement for MySQL that was started after Oracle acquired MySQL. This step-by-step guide will walk through the installation process for MariaDB on CentOS.
Install and start MariaDB
The following commands will install MariaDB, start the MariaDB server, and set it to automatically starts on system boot.
sudo yum install mariadb-server sudo systemctl start mariadb sudo systemctl enable mariadb
This command initiates a shell script to improve the security of MariaDB by changing some of the default settings. This includes allowing you to set the root password, remove anonymous accounts, disable remote root login, and remove test databases.
Login for the first time
To login to MariaDB as root, enter the following command. When prompted, enter the root password you assigned during Step 2.
mysql -u root -p