Setup Production DB Server: MariaDB + PhpMyAdmin

Standard

Update Centos:

sudo yum update
sudo yum install nano wget

DB Server

sudo yum install httpd php php-mysql

sudo service httpd start
sudo systemctl enable httpd

Install MariaDB
Add MariaDB Repo

sudo nano /etc/yum.repos.d/MariaDB.repo

Put this inside MariaDB.repo


# MariaDB 10.1 CentOS repository list - created 2016-06-07 15:06 UTC
# 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

Install and Start Maria DB

sudo yum install MariaDB-server MariaDB-client

sudo service mariadb start
sudo systemctl enable mariadb

Securing Maria DB

sudo /usr/bin/mysql_secure_installation

Installing PHP MyAdmin

sudo yum install epel-release

sudo yum install phpmyadmin

PhpMyadmin Configuration

sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

Change Php MyAdmin URL

Alias /NePhpMyAdminUrl /usr/share/phpMyAdmin

To allow access from All add Require all granted

<RequireAny>
   Require all granted
   Require ip 127.0.0.1
   Require ip ::1
</RequireAny>

Restart Web Server

sudo service httpd restart

URL

http://domain.com/NePhpMyAdminUrl