root 密码丢失后的重新设置

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



mysql> use mysql;

mysql> update user set password=PASSWORD("root") where user='root';



service mysqld stop;

service mysqld start;



/usr/local/mysql/bin/mysql -u root -p

你可能感兴趣的:(root)