tomcat

tomcat忘记密码的时候,可以通过进入安全模式,再修改密码

1.过程1
mysqld_safe --skip-grant-tables &
mysql -uroot -p (回车进入)
mysql>use mysql;
mysql> update user set password=PASSWORD("root") where user="root";
mysql> flush privileges;
mysql> quit;

2.过程2
mysql -uroot -proot
grant all privileges on *.* to root@'%' identified by 'root' with grant option;
//grant all privileges on *.* to 'root'@'localhost' identified by 'root' with grant option;
flush privileges;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION;


GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

posted @ 2017-08-11 09:31  猪是得念来过倒  阅读(103)  评论(0)    收藏  举报