1045 Access denied for user 'root'@'localhost' (using password:YES)
這個意思是說:用戶“root”@本地主機的訪問被拒絕
1、首先修改my.ini,在文件中加入skip-grant-tables,重新啟動MySQL服務

2、cmd 輸入 mysql -u root -p 出現enter password直接回車
3、use mysql

4、修改密碼: update mysql.user set authentication_string=password('root@123456') where user='root' and host='localhost";

5、flush privileges; //刷新數據庫
6、注釋掉
skip-grant-tables
7、重新啟動MySQL
