centos7安装 mysql server

1、wget http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

2、yum localinstall mysql57-community-release-el7-9.noarch.rpm
yum install mysql-community-server
root 密码 /var/log/mysqld.log   LA&85u_utZ-3  8#0%cq0We6yO

3、修改mysql 密码

mysql -u root -p  #登录
mysql>set global validate_password_policy=0; #密码强度设为最低等级
mysql>set global validate_password_length=4; #密码允许最小长度为4
mysql>flush privileges;                      #更新授权表,生效
mysql>SET PASSWORD FOR 'root'@'localhost' = 'newpass';


你可能感兴趣的:(mysql)