数据存储  盛行  1年前 (2019-07-14)  1337次浏览  已收录  0个评论  扫描二维码

文章目录

[隐藏]

1.简介

Centos7.X之后默认使用mariadb,如果我想使用命令直接安装就会安装成了mariadb数据库,使用有点不习惯。

2.相关

系统:CentOS Linux release 7.6.1810 (Core)

3.效果

Centos7.X安装mariadb及卸载mariadb安装mysql方法

4.步骤

4.1.安装mariadb并启动

安装并启动

 
  1. yum install -y mariadb-server
  2. systemctl start mariadb
  3. systemctl enable mariadb

初始化数据库

 
  1. mysql_secure_installation

4.2.卸mariadb安mysql

检查并卸载

 
  1. [[email protected] ~]#rpm -qa mariadb* && rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64

 

以上命令适用于7.6版本中,如果是其它版本请替换一下版本号。上面命令会自动判断当前系统是否存在mariadb,如果存在就卸载,如果不存在就跳过。

 

安装mysql

 

 
  1. wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
  2. rpm -ivh mysql-community-release-el7-5.noarch.rpm
  3. yum install -y mysql-community-server

启动配置

 
  1. systemctl start mysqld
  2. systemctl enable mysqld

IT博客站版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Centos7.X安装mariadb及卸载mariadb安装mysql方法

喜欢 (0)赏分享 (0)

相关文章:

  • 2021-10-09
  • 2021-12-13
  • 2021-12-13
  • 2021-10-11
  • 2021-12-13
  • 2021-06-11
猜你喜欢
  • 2021-12-13
  • 2021-12-13
  • 2021-12-13
  • 2021-12-13
  • 2021-12-13
  • 2021-12-13
  • 2021-12-13
  • 2021-04-01
相关资源
相似解决方案