1.rpm -Uvh http:
//dev
.
/get/mysql-community-release-el6-5
. #下载
install
yum-utils -y #装源
3.
yum-config-manager --disable mysql56-community # 禁用MySQL5.6的源
4.yum-config-manager --
enable
mysql57-community-dmr
# 启用MySQL5.7的源
repolist enabled |
grep
mysql
6.yum
install
mysql-community-server #安装mysql
到这里时有些会报一下错
错误显示:
软件包:mysql-community-server-5.7.20-1.el6.x86_64 (mysql57-community)
需要:.2()(64bit)
您可以尝试添加 --skip-broken 选项来解决该问题
您可以尝试执行:rpm -Va --nofiles --nodigest
解决方法:
修改vim /etc// 源文件
[mysql57-community]
name=MySQL 5.7 Community Server
## baseurl=/yum/mysql-5.7-community/el/6/$basearch/
baseurl=/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
install
mysql-community-server #再次安装mysql
start mysqld #启动mysql
status mysqld #查看mysql启动状态