Centos Mysql5.7 安装

Posted: 2020-03-13  By  vilay  |  Views(13)

1. 下载

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

2. 安装

yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server

3. 启动

service mysqld restart

4. 查看密码,修改密码

grep "password" /var/log/mysqld.log

可以看到安装的时候的临时密码,登录之后修改密码

alter user 'root'@'localhost' identified by 'password';