How to setup MariaDB 10.1 on Fedora 24 or Centos 7
Add Repository
First Create file /etc/yum.repos.d/MariaDB.repo then Copy and paste it.
# For CentOS 7 Systems
# [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
# For CentOS 6 Systems
# [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
# For Fedora 23 Systems
# [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/fedora23-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
Install MariaDB
# yum install MariaDB-server MariaDB-client
or for Fedora 25
# dnf install mariadb mariadb-common mariadb-server
Use the below command to start MariaDB server for further usage.
For SysVinit Systems
# service mysql start
For systemd Systems
# systemctl start mysql.service
For Fedora 25
# service mariadb start
Secure MariaDB
By default MariaDB wont have root password and it’s security issue. So, run the below command to secure MariaDB installation, This will set root password for MariaDB also set other permission and remove test databases too.
# mysql_secure_installation
How to access MariaDB
Use the below command to access MariaDB service.
# mysql -u root -p
Thanks to 2DayGeek