MySQL 忘記 root 密碼

MySQL 忘記 root 密碼
# mysqld_safe --skip-grant-tables &
# mysql -u root -p
Enter password:              (注:直接回車跳過)
mysql>use mysql;
mysql>update user set authentication_string=password('123456') where user="root";
mysql>flush privileges;
mysql>quit
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章