添加MariaDB软件仓库
1 | vi /etc/yum.repos.d/MariaDB.repo |
添加XtraBackup软件仓库
1 | vi /etc/yum.repos.d/MariaDB.repo |
导入MariaDB证书
1 | rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
导入Percona证书
1 | rpm --import https://www.percona.com/downloads/RPM-GPG-KEY-percona |
安装MariaDB
1 | yum install MariaDB-server MariaDB-client |
安装Percona Xtrabackup
1 | yum install percona-xtrabackup |
启动MariaDB
1 | /etc/init.d/mysql start |
开机自动启动MariaDB
1 | chkconfig mysql on |
- 或者
1 | systemctl enable mariadb.service |
初始化安全设置
1 | /usr/bin/mysql_secure_installation |
允许root远程登录
1 | mysql -uroot -p123456 |