在/etc/my.conf文件中[mysqld] 下面最后增加一行:skip-grant-tables

记住是[mysqld]下最后,不要增加到[mysqld_safe]下面

保存之后,重启Mysql,在linux命令行直接执行:mysql回车

OK

修改密码:

update mysql.user set password=password('root') where user='root'

结果报错:

mysql> select host,user,password from user ;
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
desc user;

查看字段发现没有password字段,有authentication_string字段

update mysql.user set authentication_string=password('root') where user='root' ;

ok

删除/etc/my.conf文件中[mysqld] 下面的skip-grant-tables

重启mysql

总结

以上所述是小编给大家介绍的Mysql5.7.14 linux版密码忘记完美解决办法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

标签:
mysql,linux版密码忘记,linux,密码忘记

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

评论“Mysql5.7.14 linux版密码忘记完美解决办法”

暂无“Mysql5.7.14 linux版密码忘记完美解决办法”评论...