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;

浙公网安备 33010602011771号