1.下载安装包
地址:https://dev.mysql.com/downloads/mysql/
我的电脑是centos7,64位,下载如下软件包
2.解压mysql-5.7.29-1.el7.x86_64.rpm-bundle.tar
tar -xvf mysql-5.7.29-1.el7.x86_64.rpm-bundle.tar
3.卸载之前版本
rpm -qa | grep -i mysql
4.依次安装
(1)rpm -ivh mysql-community-libs-5.7.29-1.el7.x86_64.rpm
(2)rpm -ivh mysql-community-devel-5.7.29-1.el7.x86_64.rpm
(3)rpm -ivh mysql-community-client-5.7.29-1.el7.x86_64.rpm
(4)rpm -ivh mysql-community-server-5.7.29-1.el7.x86_64.rpm
5.启动mysqld服务
systemctl start mysqld
6.查看mysql服务器状态
systemctl status mysqld
7.进入mysql客户端(root用户登录,默认密码为空