1. 程式人生 > >ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

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

註釋 .cn tables table 數據 mysql數據庫 using ice 登錄

解決:

(1)修改my.cnf中[mysqld]中增加skip-grant-tables

(2)重啟mysql數據庫:service mysqld restart

(3)無密碼登錄mysql中

(4)>use mysql;

(5)>update mysql.user set password=password(‘123456‘) where user= ‘root‘;

(6)> flush privileges;

(7)將my.cnf中增加的語句註釋

(8)重啟mysql數據庫:service mysqld restart

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