输入命令 yum -y install mysql-server
报错:
Error: Package: mysql-community-libs-5.6.44-2.el7.x86_64 (mysql56-community)
Requires: libc.so.6(GLIBC_2.17)(64bit)
Error: Package: mysql-community-client-5.6.44-2.el7.x86_64 (mysql56-community)
Requires: libc.so.6(GLIBC_2.17)(64bit)
Error: Package: mysql-community-server-5.6.44-2.el7.x86_64 (mysql56-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
Error: Package: mysql-community-server-5.6.44-2.el7.x86_64 (mysql56-community)
Requires: systemd
Error: Package: mysql-community-server-5.6.44-2.el7.x86_64 (mysql56-community)
Requires: libc.so.6(GLIBC_2.17)(64bit)
解决办法:
进入/etc/yum.repos.d目录编辑mysql-community.repo文件,将enabled设置为0,如下方所示:
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6
Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
:wq! -->保存修改!
之后重新输入命令:yum -y install mysql-server即可!