1、删除自带的数据库M
2、下载包集合并解压 ,共需要安装4个文件
tar -xvf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
rpm -qa | grep mysql
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-client-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm 出错 ( 需要安装yum install -y perl-Module-Install.noarch)
3、启动服务
systemctl start mysqld.service 出错 (需删除 rm -rf /var/lib/mysql)
systemctl status mysqld.service
systemctl enable mysqld
4、检查服务及端口
ps -ef|grep mysql
ps -ef|grep mysqld
需要安装
yum install net-tools
netstat -anop|grep 3306 ( 需要安装 yum install net-tools )