ERROR 1045 (28000): Access denied for user'root'@'localhost'(using password:YES)

ERROR 1045 (28000): Access denied for user'root'@'localhost'(using password:YES)


        我開始以爲是版本的問題,經過換了幾個版本後我不這樣認爲了,這個錯誤依然頑固的存在,經過在網上查詢之後解決了該問題。先記錄下來以備查。

  1. 在“運行”中輸入cmd進入命令行模式。
  2. 在mysql的安裝目錄的bin下把mysql.exe拖入命令行窗口,回車。
  3. 進入了mysql後輸入:mysql -u root
  4. 輸入:use mysql
  5. 輸入:update user set password=old_password('scf') where user='root' and host='localhost' ;
  6. 輸入:FLUSH PRIVILEGES;

轉載 http://blog.csdn.net/muyu114/article/details/6321989

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章