mysql 忘记密码重置

 

[root@localhost ~]# cd /etc/init.d/

[root@localhost init.d]# ls

functions  mysqld  netconsole  network  README

[root@localhost init.d]# mysqld  stop

 

/usr/local/mysql/bin/mysqld_safe  --user=mysql --skip-grant-tables &

mysql

use mysql

mysql> desc user;

 

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

mysql> flush privileges;

 

 /etc/init.d/mysqld start

posted @ 2020-07-08 11:15  XWD徐  阅读(145)  评论(0编辑  收藏  举报