centos7安装mysql8.0.31版本

本文介绍了如何在 CentOS 7 系统中卸载默认的 MariaDB,然后下载并安全安装 MySQL 8.0,包括修改 my.cnf 配置、启动服务及设置管理员密码。详细步骤确保了数据库迁移的顺利进行。

1. 卸载mariadb

因centos7默认安装了mariadb, 会造成依赖冲突,按下列方式进行卸载:

[root@canal ~]# 
[root@canal ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.68-1.el7.x86_64
[root@canal ~]# 
[root@canal ~]# rpm -e mariadb-libs --nodeps
[root@canal ~]# 
[root@canal ~]# rpm -qa | grep mariadb
[root@canal ~]# 
[root@canal ~]# 

2. 下载

[root@canal ~]# wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.31-1.el7.x86_64.rpm-bundle.tar

[root@canal ~]# mkdir mysql-8.0.31
[root@canal ~]# 
[root@canal ~]# tar -xvf mysql-8.0.31-1.el7.x86_64.rpm-bundle.tar -C mysql-8.0.31
mysql-community-client-8.0.31-1.el7.x86_64.rpm
mysql-community-client-plugins-8.0.31-1.el7.x86_64.rpm
mysql-community-common-8.0.31-1.el7.x86_64.rpm
mysql-community-debuginfo-8.0.31-1.el7.x86_64.rpm
mysql-community-devel-8.0.31-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.31-1.el7.x86_64.rpm
mysql-community-icu-data-files-8.0.31-1.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值