systemctl start mysqld.service systemctl status mysqld.service grep "password" /var/log/mysqld.log 查看默认密码 mysql -uroot -p mysql> set global validate_password_policy=0; mysql> set global validate_password_length=1; mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';