标签归档:password

又忘了mysql的密码- -囧

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’);