1. 进入MariaDB官网下载MariaDB需要的RPM包
2. 使用下载软件下载所需要的RPM包, 总共4个, 并上传到CentOS主机指定目录.
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.7/yum/centos7-amd64/rpms/
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.7/yum/centos7-amd64/rpms/MariaDB-10.2.7-centos7-x86_64-client.rpm
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.7/yum/centos7-amd64/rpms/MariaDB-10.2.7-centos7-x86_64-server.rpm
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.7/yum/centos7-amd64/rpms/MariaDB-10.2.7-centos7-x86_64-common.rpm
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.7/yum/centos7-amd64/rpms/MariaDB-10.2.7-centos7-x86_64-compat.rpm
https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.7/yum/centos7-amd64/rpms/galera-25.3.20-1.rhel7.el7.centos.x86_64.rpm
3. 安装MariaDB所需的依赖包
yum install -y libaio perl perl-DBI perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-libs perl-version
yum install galera-25.3.20-1.rhel7.el7.centos.x86_64.rpm
4. 先移除所有原有的mysql软件包
yum remove mysql*
5. 进入RPM包目录位置, 安装MariaDB
yum install -y MariaDB*
6. 安装完成后,启动MariaDB服务
service MySQL start
配置文件目录
/etc/my.cnf.d/server.cnf
数据库目录
/var/lib/mysql
7.进入mysql服务
mysql