RHEL / CentOS / Fedora 安裝 MySQL 5.7
阿新 • • 發佈:2018-12-27
首先需要有 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