时间:2021-07-01 10:21:17 帮助过:2人阅读
[root@centos7-1 ~]# grep "password" /var/log/mysqld.log
2019-08-13T11:07:27.895083Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: xkjty)i9Pe(c
因为centos7中使用了密码简易规则 所以设置1234这种简单的密码时会报错(Your password does not satisfy the current policy requirements)
所以我们在进入数据库前通过两条命令来修改一下密码规则
(set global validate_password_policy=0;)
(set global validate_password_length=1;)
接着进去数据库 设置密码(ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘123456‘;)
============================================ok!!!===========================================
centos7 mysql数据库安装和配置
标签:mys 服务 gen 重启 使用 cti length text root