Download MySQL YUM Repository

https://dev.mysql.com/downloads/repo/yum/ 에서 yum repository 패키지를 다운로드 받아 설치한다.

yum -y install mysql80-community-release-el7-2.noarch.rpm

현재 레포지토리 확인하기

yum repolist enabled | grep mysql
mysql-connectors-community/x86_64 MySQL Connectors Community                  95
mysql-tools-community/x86_64      MySQL Tools Community                       84
mysql80-community/x86_64          MySQL 8.0 Community Server                  82

원하는 버전으로 레포지토리 스위칭하기

yum repolist all | grep mysql
mysql-cluster-7.5-community/x86_64 MySQL Cluster 7.5 Community   disabled
mysql-cluster-7.5-community-source MySQL Cluster 7.5 Community - disabled
mysql-cluster-7.6-community/x86_64 MySQL Cluster 7.6 Community   disabled
mysql-cluster-7.6-community-source MySQL Cluster 7.6 Community - disabled
mysql-connectors-community/x86_64  MySQL Connectors Community    enabled:     95
mysql-connectors-community-source  MySQL Connectors Community -  disabled
mysql-tools-community/x86_64       MySQL Tools Community         enabled:     84
mysql-tools-community-source       MySQL Tools Community - Sourc disabled
mysql-tools-preview/x86_64         MySQL Tools Preview           disabled
mysql-tools-preview-source         MySQL Tools Preview - Source  disabled
mysql55-community/x86_64           MySQL 5.5 Community Server    disabled
mysql55-community-source           MySQL 5.5 Community Server -  disabled
mysql56-community/x86_64           MySQL 5.6 Community Server    disabled
mysql56-community-source           MySQL 5.6 Community Server -  disabled
mysql57-community/x86_64           MySQL 5.7 Community Server    disabled
mysql57-community-source           MySQL 5.7 Community Server -  disabled
mysql80-community/x86_64           MySQL 8.0 Community Server    enabled:     82
mysql80-community-source           MySQL 8.0 Community Server -  disabled

mysql 5.7을 설치 하기 위해서 기존 mysql 8.0 레포지토리를 비활성화 하고 mysql 5.7 레포지토리를 활성화 한다.

# mysql 8.0 레포지토리 비활성화
yum-config-manager --disable mysql80-community
# mysql 5.7 레포지토리 활성화
yum-config-manager --enable mysql57-communit

설치 및 구동

# mysql 설치
yum -y install mysql-community-server

# mysql 구동
systemctl start mysqld

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다