CentOS 7.2 install MariaDB

  Copyright statement: This article is an original article by Shaon Puppet. Please indicate the original address for reprinting. Thank you very much. https://blog.csdn.net/wh211212/article/details/53129488

Introduction to MariaDB#

Install MariaDB 5.5

[ root@linuxprobe~]# yum -y install mariadb-server
[ root@linuxprobe~]# vi /etc/my.cnf
# add follows within [mysqld] section
[ mysqld]
character-set-server=utf8
[ root@linuxprobe~]# systemctl start mariadb
[ root@linuxprobe~]# systemctl enable mariadb
ln -s '/usr/lib/systemd/system/mariadb.service''/etc/systemd/system/multi-user.target.wants/mariadb.service'
[ root@linuxprobe~]# mysql_secure_installation   #Same as MySQL, all the way y
[ root@linuxprobe ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with; or \g.
Your MariaDB connection id is 1023
Server version:5.5.50-MariaDB MariaDB Server

Copyright(c)2000,2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select user,host,password from mysql.user;+-----------+-----------+-------------------------------------------+| user      | host      | password                                  |+-----------+-----------+-------------------------------------------+| root      | localhost |*F1DAE8BCDFCA7A57F246E0F834AC35830A3D640E || root      |127.0.0.1|*F1DAE8BCDFCA7A57F246E0F834AC35830A3D640E || root      |::1|*F1DAE8BCDFCA7A57F246E0F834AC35830A3D640E |+-----------+-----------+-------------------------------------------+5 rows inset(0.00 sec)
MariaDB [(none)]> show databases;+--------------------+| Database           |+--------------------+| information_schema || mysql              || performance_schema |+--------------------+5 rows inset(0.05 sec)
MariaDB [(none)]> exit;
Bye
# Client settings
[ root@vdevops ~]# firewall-cmd --add-service=mysql --permanent
success
[ root@vdevops ~]# firewall-cmd --reload
success

Install phpMyAdmin#

The premise is to install the web server and php, refer to the following:
http://blog.csdn.net/wh211212/article/details/52982917http://blog.csdn.net/wh211212/article/details/52994505

 # install from EPEL
[ root@linuxprobe~]# yum --enablerepo=epel -y install phpMyAdmin php-mysql php-mcrypt
[ root@linuxprobe~]# vi /etc/httpd/conf.d/phpMyAdmin.conf
# line 17: IP address you permit to access
Require ip 127.0.0.110.1.1.0/24
# line 34: IP address you permit to access
Require ip 127.0.0.110.1.1.o/24[root@linuxprobe ~]# systemctl restart httpd 

MariaDB master-slave replication#

MariaDB master-slave replication is the same as MySQL master-slave replication, please move to: http://blog.csdn.net/wh211212/article/details/53105335

Install MariaDB 10.1

[ root@linuxprobe ~]# yum --enablerepo=centos-sclo-rh -y install rh-mariadb101-mariadb-server
[ root@linuxprobe ~]# scl enable rh-mariadb101 bash 
[ root@linuxprobe ~]# mysql -V
mysql  Ver 15.1 Distrib 10.1.14-MariaDB,forLinux(x86_64) using  EditLine wrapper
[ root@linuxprobe ~]# which mysql
/opt/rh/rh-mariadb101/root/usr/bin/mysql
[ root@linuxprobe ~]# vi /etc/profile.d/rh-mariadb101.sh
# create new
#! /bin/bash
source /opt/rh/rh-mariadb101/enable
export X_SCLS="`scl enable rh-mariadb101 'echo $X_SCLS'`"
[ root@linuxprobe ~]# mysql_secure_installation 

Recommended Posts

CentOS 7.2 install MariaDB
Centos7 YUM install MariaDB 10.0
Centos7 YUM install MariaDB 10.0
Install MariaDB under MariaDB Centos7
1.5 Install Centos7
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
Vmware install CentOS6
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
CentOS6 install mist.io
Centos7 install Docker
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Centos7 install Nginx
CentOS6.5 install CDH5.13
Centos7 install docker18
Centos install Python3
centos7 install docker
CentOS install jdk
centos7 install nginx-rtmp
CentOS8 install MySQL8.0
Centos6.3 install KVM
CentOS install PostgreSQL 9.1
CentOS7 install mysql8
CentOS 7 install Java 1.8
How to install MariaDB on CentOS 8
CentOS8 install fastdfs6.06
CentOS 7 install Gitlab
Centos 7 install PostgreSQL
CentOS7 install MySQL8
CentOS 7 install Java 1.8
CentOS 6 install Docker
centos 6.5 install zabbix 4.4
Centos8 install Docker
CentOS6.8 install python2.7
CentOS install nodejs 8
CentOS6.5 install GNS3
centos 7.5 install mysql5.7.17
Centos7 install MySQL8.0-manual
CentOS7 install Kubernetes 1.16.3
VirtualBox install centos7
centos7 install lamp
Install centos7 and connect
Install Docker on Centos7