service mysqld stop
mysqld_safe --skip-grant-tables
UPDATE mysql.user SET Password=PASSWORD('xinmima') WHERE User='root';
FLUSH PRIVILEGES;
mysql5.6以后,users表没有password了,需要:
SET PASSWORD FOR ‘root’ = PASSWORD(‘NewPass’);
service mysqld stop
mysqld_safe --skip-grant-tables
UPDATE mysql.user SET Password=PASSWORD('xinmima') WHERE User='root';
FLUSH PRIVILEGES;
mysql5.6以后,users表没有password了,需要:
SET PASSWORD FOR ‘root’ = PASSWORD(‘NewPass’);