1.mysql官网下载yum源
https://dev.mysql.com/downloads/repo/yum/
2.安装mysql yum源:
yum localinstall mysql-xxx-xxx.rpm
3.cd /etc/yum.repos.d/
4.可以选择配置安装的版本
5.开始进行安装:
yum install mysql-community-server
6.检查mysql 状态是否启动 :
service mysqld status
7.如果没有启动:
service mysqld start
8.找到mysql的登陆密码:
cat /var/log/mysqld.log
9.修改密码:
alter user 'root'@'localhost' identified by 'root'
------
修改密码安全策略
show variables like '%password%'
set global validate_password_policy=0;
set global validate_password_length=1;