1 查看CentOS的mariadb是否已安装
# yum list installed | grep mariadb-server
mariadb-server.x86_64 1:5.5.50-1.el7_2 @updates
2 若有安装的mariadb-server,如何卸载CentOS系统mariadb-server数据库?
输入:yum -y remove mariadb-server.x86_64 ,若有多个依赖文件则依次卸载。
当结果显示为Complete!即卸载完毕。
3 查看yum库上的mariadb-server版本信息(CentOS系统需要正常连接网络)。
输入:yum list | grep mariadb-server 或 yum -y list mariadb-server*
4 查看mariadb的依赖情况
# yum search mariadb
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
5 使用yum安装mysql数据库
# yum install mariadb-server -y
6 查看刚安装mysql数据库版本信息。
输入:rpm -qi mysql-server
# rpm -qi mariadb-server
Name : mariadb-server
Epoch : 1
Version : 5.5.50
Release : 1.el7_2
Architecture: x86_64
7 启动
# systemctl start mariadb.service
8 开机自启动mariadb
# systemctl enable mariadb.service
9 状态
# systemctl status mariadb.service
10 登录
# mysql
11 登录
# mysql -uroot -p
# yum list installed | grep mariadb-server
mariadb-server.x86_64 1:5.5.50-1.el7_2 @updates
2 若有安装的mariadb-server,如何卸载CentOS系统mariadb-server数据库?
输入:yum -y remove mariadb-server.x86_64 ,若有多个依赖文件则依次卸载。
当结果显示为Complete!即卸载完毕。
3 查看yum库上的mariadb-server版本信息(CentOS系统需要正常连接网络)。
输入:yum list | grep mariadb-server 或 yum -y list mariadb-server*
4 查看mariadb的依赖情况
# yum search mariadb
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
5 使用yum安装mysql数据库
# yum install mariadb-server -y
6 查看刚安装mysql数据库版本信息。
输入:rpm -qi mysql-server
# rpm -qi mariadb-server
Name : mariadb-server
Epoch : 1
Version : 5.5.50
Release : 1.el7_2
Architecture: x86_64
7 启动
# systemctl start mariadb.service
8 开机自启动mariadb
# systemctl enable mariadb.service
9 状态
# systemctl status mariadb.service
10 登录
# mysql
11 登录
# mysql -uroot -p