1:启动MySQL
systemctl start mysqld.service
2:查看MySQL运行状态
systemctl status mysqld.service
3:查看默认密码
grep "password" /var/log/mysqld.log
4:修改密码:
ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码';
密码:要求含有大小写、数字、特殊字符