Linux如何开启mysql版本

vim /etc/yum.repos.d/mysql-community.repo
[mysql55-community]
name=MySQL 5.5 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=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

# Enable to use MySQL 5.7
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1改1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/
enabled=0变0
"/etc/yum.repos.d/mysql-community.repo" 65L, 1864C

[root@localhost ~]# yum list | grep mysql-community-server
mysql-community-server.x86_64 5.7.25-1.el7 mysql57-co

[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id

[root@localhost ~]# yum clean all清理缓存
Loaded plugins: fastestmirror
Cleaning repos: base extras mys

[root@localhost ~]# yum makecache生成新的缓存
Loaded plugins: fastestmirror













原文地址:https://www.cnblogs.com/huangjiaxuan/p/12850393.html