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

 

相關文章:

mysql 安裝好後,root 的 temp password
http://stackoverflow.max-everyday.com/2017/12/mysql-root-temp-password/

相關文章

寫留言

你的電子郵件位址並不會被公開。 必要欄位標記為 *