Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Win7 MySQL 忘記 root 密碼怎麼辦?跳過授權表啟動服務、命令列更新 user 表密碼

編輯:關於 Windows

MySQL 忘記 root 密碼重置:1) Win+R → cmd → cd mysql/bin;2) 執行 mysqld --defaults-file="D:\phpStudy\MySQL\my.ini" --console --skip-grant-tables 跳過授權;3) 新開 CMD → mysql 免密登入;4) use mysql; UPDATE user SET password=PASSWORD('12345') WHERE user='root'; FLUSH PRIVILEGES; → 重啟服務驗證新密碼。路徑請依實際安裝目錄調整。

Copyright © Windows教程網 All Rights Reserved