mysql 5.7在Linux下安装后
使用:find / -name 指令,搜索 mysqld.log文件。
:— find / -name mysqld.log
vi查看 mysqld.log
默认登录密码:
2019-06-10T10:17:45.177897Z 1 [Note] A temporary password is generated for root@localhost: eyuE933f6t!Z
拿到初始化密码登录mysql修改密码
改密时候出现
Your password does not satisfy the current policy requirements 报错
默认启用的密码校验,可以编辑my.cnf,添加 validate_password=OFF关闭校验,保存并重启MySQL,然后再修改密码
:— find / -name my.cnf
:— vi编辑文件 a进入编辑模式 :wq!保存退出
:— service mysqld restart重启mysql