MySql 忘记密码找回,修改密码

MySql忘记root密码找回:

mysqld_safe --skip-grant-tables &

mysql -uroot -p

use mysql;

update user set password =PASSWORD("12345678") where user ="root";

到此成功修改root密码。执行下图语句生效

flush privileges;

二:如何开启MySql支持远程连接

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

三:Mysql修改密码

update user set password =PASSWORD("12345678") where user ="root";

 

 

 

你可能感兴趣的:(MySql 忘记密码找回,修改密码)