table of Contents
win10 password reset mariadb
Note:
win 10 after mounting MariaDB rarely used, was found forgotten the root password; so here recording MariaDB root password reset and password reset procedure is as follows:
Stop MariaDB Service
CTRL + ALT + Del
Into the task manager to find the mysql kill off
Reset the root password MariaDB
After the service stops, we edit the following, save it as a TXT file, the file name can be customized, saved as here reset-password.txt
:
UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE USER='root';
FLUSH PRIVILEGES;
Note:
The contents of the "NewPassword" is replaced with the new password you want to set. The finished editing the reset-password.txt
files are placed in the path of a stand, note the path, I am hereC:\Users\test\Desktop\reset-password.txt
In the command prompt window, enter the bin file MariaDB installation directory folder, I have here is C: \ Program Files \ MariaDB 10.0 \ bin. Execute the following command:
mysqld.exe --init-file=C:\Users\test\Desktop\reset-password.txt
After completion of the command, root password has been changed to the new password you set in the reset-password.txt, in which case you can remove reset-password.txt.
Restart MariaDB Service
Note:
enter the Services tab in Task Manager, right MariaDB select Start. MariaDB after the restart, you can use the new password to connect to the server MariaDB