重置mysql密码


代码

> mysqld stop
> mysqld --skip-grant-tables --skip-networking

> mysql
> UPDATE mysql.user SET Password=PASSWORD('newpass') WHERE User='root' AND Host='localhost';
> FLUSH PRIVILEGES;

> mysqld restart
Joyce /
Published under (CC) BY-NC-SA in categories mysql  tagged with mysql