CentOS7 离线安装 Mysql5.7

CentOS7 离线安装 Mysql5.7

资源下载

1,前往Mysql官网选择对应版本进行下载。
2,官网下载比较慢,可以使用CSDN下载

卸载mariadb

# rpm -qa | grep mariadb
mariadb-libs-5.5.60-1.el7_5.x86_64
# rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64
错误:依赖检测失败:
        libmysqlclient.so.18()(64bit) 被 (已安裝) net-snmp-1:5.7.2-37.el7.x86_64 需要
        libmysqlclient.so.18()(64bit) 被 (已安裝) postfix-2:2.10.1-7.el7.x86_64 需要
        libmysqlclient.so.18()(64bit) 被 (已安裝) libmapi-7.1.14-3.el7.x86_64 需要
        libmysqlclient.so.18(libmysqlclient_18)(64bit) 被 (已安裝) postfix-2:2.10.1-7.el7.x86_64 需要
        libmysqlclient.so.18(libmysqlclient_18)(64bit) 被 (已安裝) libmapi-7.1.14-3.el7.x86_64 需要
        mysql-libs 被 (已安裝) net-snmp-1:5.7.2-37.el7.x86_64 需要

遇到报错,进行强制卸载。

# rpm --nodeps -e mariadb-libs-5.5.60-1.el7_5.x86_64

安装Mysql

# tar -xvf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar

# rpm -ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm
# rpm -ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm
# rpm -ivh mysql-community-devel-5.7.28-1.el7.x86_64.rpm
# rpm -ivh mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
# rpm -ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm
# rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm

启动Mysql服务

# systemctl restart mysqld
# systemctl enable mysqld

开启防火墙

# firewall-cmd --add-port=3306/tcp --permanent
# firewall-cmd --reload
# firewall-cmd --list-all
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 鲸 设计师:meimeiellie 返回首页