win10重置mariadb密碼

2022-07-28 07:24:09 字數 851 閱讀 5708

目錄note:

win 10 安裝 mariadb 之後很少用, 後來發現root密碼忘記了; 所以這裡記錄重置 mariadb 的 root 使用者密碼,重置密碼的過程如下:

ctrl + alt + del進入任務管理器 找到mysql kill 掉

update mysql.user set password=password('newpassword')  where user='root';

flush privileges;

note:

將內容中的「newpassword」替換為你希望設定的新密碼。將編輯完畢的reset-password.txt檔案放置在某個路徑下待用,記下路徑,我這裡是c:\users\test\desktop\reset-password.txt

在命令提示符視窗中進入 mariadb 安裝目錄中的 bin 資料夾,我這裡是 c:\program files\mariadb 10.0\bin。執行如下命令:

mysqld.exe --init-file=c:\users\test\desktop\reset-password.txt
命令執行完成後,root 密碼已經修改為了你在 reset-password.txt 中設定的新密碼,此時可將 reset-password.txt 刪除。

note:

進入任務管理器中的服務選項卡,右鍵 mariadb 選擇啟動。mariadb 重新啟動後,你就可以使用新密碼來連線 mariadb 伺服器了

win10下,MySQL5 5 61重置密碼

前段時間要登入mysql時,發現忘記了密碼,多次上網查資料後並一一驗證,才找到適合我使用的方法。作業系統 win10 mysql版本 5.5.61 1.使用管理員身份執行notepad 開啟mysql安裝目錄c program files mysql mysql server 5.5下的配置檔案my...

win10 mysql8 重置密碼

1.通過services.msc 停止mysqld 服務 2.開啟跳過密碼驗證登入的mysql服務 輸入命令 shell 中 切換到mysq bin目錄 mysqld console skip grant tables shared memory 3.再開啟乙個新的shell,無密碼登入mysql,...

windows MySQL8 重置root密碼

關閉mysql net stop mysql 用管理員模式開啟cmd,進入到mysql的bin目錄下 使用下面命令 mysqld console skip grant tables shared memory 再用管理員模式開啟另乙個cmd終端,進入到mysql的bin目錄下,使用下面命令登入mys...