安装 mariadb 服务
yum install -y mariadb-server
安装 mariadb 命令行客户端
yum install -y mariadb
安装 mariadb 开发包
yum install -y mariadb-devel
启动
启动服务
systemctl start mariadb
设置服务开启自启动
systemctl enable mariadb
查看服务状态
systemctl status mariadb
测试连接
使用命令行客户端尝试连接
mysql -uroot
可能的输出为
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.60-MariaDB MariaDB Server
Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>