文件通过官网下载
https://downloads.mysql.com/archives/community/
1.
mysql-community-common-5.7.18-1.el7.x86_64.rpm
mysql-community-libs-5.7.18-1.el7.x86_64.rpm
mysql-community-client-5.7.18-1.el7.x86_64.rpm
mysql-community-server-5.7.18-1.el7.x86_64.rpm
mysql-community-devel-5.7.18-1.el7.x86_64.rpm
2.启动服务
service mysqld start
cat /var/log/mysqld.log
3.mysql 设置密码:
alter user user() identified by "Password1!";
4.mysql 设置所有用户访问:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Password1!';
flush privileges;