# 下載 wget http://repo.mysql.com/mysql57-community-release-el6-10.noarch.rpm # 安裝 yum -y localinstall mysql57-community-release-el6-10.noarch.rpm # 或 rpm -Uvh mysql57-community-release-el6-10.noarch.rpm
2、安裝成功後在/etc/yum.repos.d/下會多出幾個mysql的yum源的配置,以下:javascript
[root@keepmydream ~]# ls -lh /etc/yum.repos.d/ total 36K -rw-r--r--. 1 root root 2.5K Jun 16 06:21 CentOS-Base.repo -rw-r--r--. 1 root root 2.0K Mar 28 2017 CentOS-Base.repo.back -rw-r--r--. 1 root root 647 Mar 28 2017 CentOS-Debuginfo.repo -rw-r--r--. 1 root root 289 Mar 28 2017 CentOS-fasttrack.repo -rw-r--r--. 1 root root 630 Mar 28 2017 CentOS-Media.repo -rw-r--r--. 1 root root 7.9K Mar 28 2017 CentOS-Vault.repo -rw-r--r--. 1 root root 1.6K Apr 5 2017 mysql-community.repo -rw-r--r--. 1 root root 1.7K Apr 5 2017 mysql-community-source.repo
安裝mysqljava
[root@keepmydream ~]# yum -y install mysql-community-server[root@keepmydream ~]# yum -y install mysql-community-server
查看版本mysql
mysql -V mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper