===== The current user password is known =====
P.S.: This article is only for user password changes under Windows.
1. Use the Bin folder to enter MySQL:
CD Path\to\bin\mysqladmin.exe
2. Enter the following command:
Mysqladmin-u root-p Password
3. Prompt to enter the password for the current user (root, which can be another user):
Enter your password:yourpassword
4. Enter the new password and confirm the password you entered.
===== do not know the current user password when =====
1.CD Path\to\mysql.exe
2. Log in to the root user role and execute the following command:
SET PASSWORD for [email protected] "%" = PASSWORD (Demopassword);
P.S.: In addition, when the user forgets the root password, but can use data management tools such as phpMyAdmin to access, you can directly adhere to its relevant directory configuration file.
Modify the password for the MySQL user