码迷,mamicode.com
首页 > 数据库 > 详细

mysql忘记密码

时间:2017-09-04 00:02:47      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:and   oca   cat   white   回车   art   use   div   rest   

在/ect/my.cnf中添加如下:
skip-grant-tables
sudo mysqld restart
mysql回车,进入到sql
>user mysql;
>update user set authentication_string=password(‘123qwe‘) where user=‘root‘ and Host = ‘localhost‘;
搞定;
删掉skip-grant-tables;
sudo mysqld restart
完事;

mysql忘记密码

标签:and   oca   cat   white   回车   art   use   div   rest   

原文地址:http://www.cnblogs.com/xiashiwendao/p/7471243.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!