参考连接:51759200前提环境:Centos 6.* 本身配置的yum源自带的mysql版本为5.1;后续希望yum安装5.*其他版本的数据库可以使用新增yum源进行测试安装。
1. Configure the Yum source
Download the Yum source RPM installation package on the MySQL website: http://dev.mysql.com/downloads/repo/yum/
2. # download MySQL Source installation package
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 安装yum源 shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm
3. Check if the MySQL source is installed successfully
shell> yum repolist enabled | grep "mysql.*-community.*"
4, see the instructions can be MySQL source installation completed.
可以修改vim /etc/yum.repos.d/mysql-community.repo源,改变默认安装的mysql版本。比如要安装5.6版本,将5.7源的enabled=1改成enabled=0。然后再将5.6源的enabled=0改成enabled=1即可。改完之后的效果如下所示:
Subsequent installation of the database can be done using yum install Mysql-community-server!
Follow-up: Feel this replacement of the original Yum source for the high-level installation of the database is relatively novel, so recorded.
Update your local MySQL source with MySQL website configuration