MySQL密碼丟了,如何找回?
shell> mysqld_safe --skip-grant-tables &
啟動(dòng)數(shù)據(jù)庫(kù)服務(wù)
shell> mysql -uroot -ppassowrd -e "use mysql;update user set
passowrd = PASSWORD('newpassword') where user = 'root';flush
privileges;"
shell> mysqld_safe --skip-grant-tables &
啟動(dòng)數(shù)據(jù)庫(kù)服務(wù)
shell> mysql -uroot -ppassowrd -e "use mysql;update user set
passowrd = PASSWORD('newpassword') where user = 'root';flush
privileges;"