1.到服务器下载的链接

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

三、Centos7安装Mysql-LMLPHP

2.执行命令

sudo rpm -ivh mysql57-community-release-el7-11.noarch.rpm

三、Centos7安装Mysql-LMLPHP

3.安装mysql

yum -y install mysql mysql-server

 三、Centos7安装Mysql-LMLPHP

4.启动

service mysqld start

三、Centos7安装Mysql-LMLPHP

5.Mysql 5.7 初始化密码

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

三、Centos7安装Mysql-LMLPHP

6.修改 root 密码

登录
mysql -u root -p
修改密码
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('密码');
刷新,立刻生效
FLUSH PRIVILEGES;

三、Centos7安装Mysql-LMLPHP

04-06 18:32