Access denied for user: 'root@localhost' (Using password: YES),

來源:互聯網
上載者:User

Access denied for user: 'root@localhost' (Using password: YES),

centos 安裝mysql成功後

首次使用root登入發生:Access denied for user: 'root@localhost' (Using password: YES)  

原因是mysql初始db中的mysql庫user表中root密碼為空白

因此你需要修改root密碼

首先執行:mysql -u root 

進入mysql 庫命令列

然後進入mysql庫:use mysql;

進入後再執行修改密碼即可:update user set password=password('aaa') where user='root'


mysql出問題了:Access denied for user: 'root@localhost' (Using password: YES)

樓上說得基本正確了,如果是自己電腦測試的話,第一項就不會錯了,其他的你自己檢查下,使用者名稱,密碼,資料庫名是否正確。
 
mysql問題:access denied for user 'root@localhost'(using password: YES)

這個錯誤的意思是root密碼錯誤,如果不知道root的密碼,請換一個能登陸的使用者名稱和密碼。

---
以上,希望對你有所協助。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.