MariaDB Quickest Quick start

This article outlines the bare minimum to get a MariaDB or MySQL database up and running.

It covers a CentOS/RHEL and an ArchLinux installs.

Make sure your system is up to date:

CentOS/RHEL ArchLinux
yum update -y pacman -Syu

Install the software:

CentOS/RHEL ArchLinux
yum install mariadb-server pacman -S mariadb
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Start the database service:

 systemctl start mariadb

Check if it is running:

 systemctl is-active mariadb.service
 systemctl status mariadb

The following step is optional but highly recommended:

 mysql_secure_installation

Enable database to start on start-up:

 systemctl enable mariadb

Enter SQL:

 mysql -u root -p

Creating database:

 create database bugzilla;
 FLUSH PRIVILEGES;

Create user:

 GRANT ALL PRIVILEGES ON bugzilla.* TO 'warren'@'localhost' IDENTIFIED BY 'mypass';
 GRANT ALL PRIVILEGES ON killrate.* TO 'pocketmine'@'%' IDENTIFIED BY 'mypass';
 FLUSH PRIVILEGES;