当前位置: 移动技术网 > 科技>操作系统>Linux > MySQL5.7没有初始密码解决办法

MySQL5.7没有初始密码解决办法

2020年04月29日  | 移动技术网科技  | 我要评论

小三泪铃声,purehd,金榜题名粤语

目录

1.开启跳过权限验证

vi /etc/my.cnf
[mysqld]
skip-grant-tables

/etc/init.d/mysqld restart

2.重置密码

use mysql;
update user set authentication_string=password('123456') where user='root' and host='localhost';
flush privileges;

/etc/init.d/mysqld restart

vi /etc/my.cnf
[mysqld]
skip-grant-tables    #delete

/etc/init.d/mysqld restart

alter user 'root'@'localhost' identified by '123456';

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网