一、下载MYSQL:
1.查看是否安装wget:wget http://www.baidu.com
2.如果没有安装,执行安装:yum install wget
3.再次执行wget测试是否安装成功:wget http://www.baidu.com
二、下载MYSQL:wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
注:在哪个目录下执行,下载就在哪个目录
三、进行repo的安装:rpm -ivh mysql57-community-release-el7-9.noarch.rpm
执行完成后会在/etc/yum.repos.d/目录下生成两个repo文件mysql-community.repo、mysql-community-source.repo。
四、安装MYSQL:在/etc/yum.repos.d下执行:yum install mysql-server
五、启动并设置开机自启:
systemctl start mysqld
systemctl enable mysqld
systemctl daemon-reload
六、第一次登陆先获取临时密码:grep ‘temporary password’ /var/log/mysqld.log
七、登