如何解決mysql的1045錯(cuò)誤,修改root密碼???先cmd中輸入 net stop mysql //停止Mysql服務(wù)然后在my.ini文件中的[mysqld]下面一行添加 skip_gr
如何解決mysql的1045錯(cuò)誤,修改root密碼?
??先cmd中輸入 net stop mysql //停止Mysql服務(wù)然后在my.ini文件中的[mysqld]下面一行添加 skip_grant_tables(加上這句話)在cmd中將目錄切換到你的Mysql的安裝路徑,如我的是C:Program FilesMySQLMySQL Server 5.1bin所以在cmd中輸入cd C:Program FilesMySQLMySQL Server 5.1bin再次輸入 mysql -uroot -p ,這時(shí)cmd將切換成mysql模式在mysql中輸入 UPDATE user SET Password=PASSWORD("newpassword") where USER="root"好了,現(xiàn)在你的root密碼已經(jīng)更改成newpassword了將my.ini中添加的 skip_grant_tables 刪除重啟mysql服務(wù),net start mysql , 一切搞定~~~