又忘了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’);

Leave a line?

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据