1.net stop mysql_server 先關掉系統服務
2.mysqld --console --skip-grant-tables --shared-memory
3.重新打開一個cmd,進入bin目錄 mysql.exe -u root 可以以空密碼的形式登錄到mysql中
4.UPDATE mysql.user SET authentication_string='' WHERE user='root' and host='localhost';執行腳本修改密碼
1.net stop mysql_server 先關掉系統服務
2.mysqld --console --skip-grant-tables --shared-memory
3.重新打開一個cmd,進入bin目錄 mysql.exe -u root 可以以空密碼的形式登錄到mysql中
4.UPDATE mysql.user SET authentication_string='' WHERE user='root' and host='localhost';執行腳本修改密碼