Install mysql5.7 on centos7.2

1、Download MySQL Yum Repository

  https://dev.mysql.com/downloads/repo/yum/

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

2、Adding the MySQL Yum Repository

  yum install -y mysql57-community-release-el7-11.noarch.rpm

 

or  rpm -Uvh mysql57-community-release-el7-11.noarch.rpm

 3、Selecting a Release Series 

  the latest GA release of MySQL is selected for installation by default  mysql57-community

yum repolist enabled | grep mysql

enable the subrepository for the specific series(mysql56-community)

  yum-config-manager --disable mysql57-community
  yum-config-manager --enable mysql56-community

OR change enabled=1 option of repo file

4、Installing MySQL

yum install -y  mysql-community-server

5、Starting the MySQL Server

  systemctl start mysqld

6、find&change mysql passwd

grep 'temporary password' /var/log/mysqld.log

mysql -uroot -p

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

7、mysql-yum-repo-quick-guide

https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

posted @ 2017-06-16 14:28  Jacob_tian  阅读(228)  评论(0编辑  收藏  举报