1. 程式人生 > >RHEL / CentOS / Fedora 安裝 MySQL 5.7

RHEL / CentOS / Fedora 安裝 MySQL 5.7

首先需要有 wget 指令:

yum install wget

加入 MySQL Yum Repository

根據不同的發行版下載相應的 RPM 及安裝:

RHEL 7, CentOS 7:

wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum localinstall mysql57-community-release-el7-7.noarch.rpm

RHEL 6, CentOS 6:

wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
yum localinstall mysql57-community-release-el6-7.noarch.rpm

Fedora 23:

wget http://dev.mysql.com/get/mysql57-community-release-fc23-7.noarch.rpm
dnf localinstall mysql57-community-release-fc23-7.noarch.rpm

Fedora 22:

wget http://dev.mysql.com/get/mysql57-community-release-fc22-7.noarch.rpm
dnf localinstall mysql57-community-release-fc22-7.noarch.rpm

安裝 MySQL

啟用了 MySQL 的 YUM Repository 後, 可以用 yum 或 dnf 安裝 MySQL 最新版, 目前最新版是 MySQL 5.7:

RHEL, CentOS:

yum install mysql-community-server

Fedora:

dnf install mysql-community-server

啟動 MySQL:

service mysqld start

service mysql start

相關文章: