一、配置YUM源html
下载mysql源安装包
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpmmysql
安装mysql源
shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm
检查MySQL源是否安装成功
shell> yum repolist enabled | grep “mysql.-community.” sql
二、安装MySQL
shell> yum install mysql-community-server
三、启动MySQL服务
shell> systemctl start mysqld
查看MySQL的启动状态
shell> systemctl status mysqldshell
四、开机启动
shell> systemctl enable mysqld
shell> systemctl daemon-reload数据库
五、修改root本地登陆密码
grep ‘temporary password’ /var/log/mysqld.log
mysql -uroot –p+生产注意:mysql5.7默认安装了密码安全检查插件(validate_password),默认密码检