丟失root密碼:
mysqld_safe --skip-grant-tables&
mysql -u root mysql
更新mysql密碼
update mysql.user set authentication_string=password('yuhang') where user='root' and Host ='localhost';
使用以下密碼進(jìn)入mysql root帳號(hào)
mysql -u root -p
Enter Password 輸入密碼進(jìn)入
yuhang