《安裝mysql后連接出錯(錯誤:Access denied for user 'root'@'localhost' (using password: YES)")的解決辦法》要點:
本文介紹了安裝mysql后連接出錯(錯誤:Access denied for user 'root'@'localhost' (using password: YES)")的解決辦法,希望對您有用。如果有疑問,可以聯系我們。
?
解決方法:
1、打開mysql Command Line Client,輸入安裝mysql時設置的密碼,出現如下界面;
.
2、輸入 "use mysql;"后回車,用于應用mysql,出現如下界面;
3、輸入 "select user,host from user;"后回車,用于查詢數據庫的用戶信息.出現如下界面;
4、輸入“select user,host,password from user;”后回車,用于查詢用戶是否設置了密碼,若能查出則跳至步驟6,若查不出則繼續往下執行(本人當時就查不出所以先添加了password列,再執行修改密碼);
5、輸入“alter table user add column password varchar(64);”后回車,用于添加password列.
6、輸入“update user set password=password('123');”后回車,用于修改密碼為123,出現如下界面;
至此問題得以解決.
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/5539.html