centos7.x 安装 MySQL 5.5

centos7默认自带的是mariadb,有些旧业务需要老版本的mysql
卸载原有mariadb

// 检索是否安装了mariadb
# rpm -qa | grep mariadb
mariadb-5.5.56-2.el7.x86_64
mariadb-devel-5.5.56-2.el7.x86_64
mariadb-libs-5.5.56-2.el7.x86_64
mariadb-server-5.5.56-2.el7.x86_64
// 卸载mariadb
# rpm -e --nodeps mariadb-5.5.56-2.el7.x86_64 mariadb-devel-5.5.56-2.el7.x86_64 
mariadb-libs-5.5.56-2.el7.x86_64 mariadb-server-5.5.56-2.el7.x86_64
// 设置rmp 
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
// 下载安装MySql client and server
# yum install mysql55w mysql55w-server
// 启动MySql
# service mysqld start
// 修改密码(初始密码为空)
# mysqladmin -u root password 'root'
// 登录
# mysql -u root -p

标签: none

添加新评论