安装 MySQL 官方源

yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

// yum 切换 MySQL 5.7 的源
yum-config-manager --disable mysql80-community

出现如下错误:

-bash: yum-config-manager: command not foun

解决方法:
因为系统中没有这个命令 yum-config-manager ,先使用命令 whatprovides 查询 yum-config-manager 属于哪个 npm 包

[root@nodejs ~]#  yum whatprovides yum-config-manager
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
yum-utils-1.1.31-53.el7.noarch : Utilities based around the yum package manager
Repo        : base
Matched from:
Filename    : /usr/bin/yum-config-manager

yum-utils-1.1.31-54.el7_8.noarch : Utilities based around the yum package manager
Repo        : updates
Matched from:
Filename    : /usr/bin/yum-config-manager

以上查询结果,说明 yum-config-manager 由 yum-utils 包提供,安装 yum-utils

yum install yum-utils -y

解决在 CentOS 8 版本安装 MySQL 5.7 版本问题。

标签: CentOS, MySQL