丟失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';
使用以下密碼進入mysql root帳號
mysql -u root -p
Enter Password 輸入密碼進入
yuhang
丟失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';
使用以下密碼進入mysql root帳號
mysql -u root -p
Enter Password 輸入密碼進入
yuhang