mysql登錄遇到ERROR 1045問題解決方法
mysql登錄時(shí)出現(xiàn)了錯(cuò)誤:ERROR 1045: Access denied for user,是什么原因呢?
在Windows系統(tǒng)中,mysql登錄的時(shí)候出現(xiàn)了這樣的錯(cuò)誤:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
找了一些辦法,終于得到了解決,現(xiàn)在記錄一下具體的解決方法:
c:>sc stop mysql
c:>mysqld --defaults-file="C:MySQLMySQLServer6.0my.ini" --console --skip-grant-tables
重新開一個(gè)cmd
c:>mysql -uroot -p
enter password: <- 回車
mysql>update user SET Password=PASSWord('newpassword') where USER='root';
mysql>FLUSH PRIVILEGES;
mysql>quit