Because the database password is often changed, but also found several ways to modify the database password, here to introduce you for reference through the Navicat Management database client to modify the database password:
Select Database---Click on the navigation bar---Edit the user---you can modify the database.
The command line modifies the database password:
1. Open the folder where Mysql.exe and Mysqld.exe are located, copy the path address
2. Open the cmd command prompt and go to the folder where the previous step Mysql.exe is located.
3. Enter the command mysqld--skip-grant-tables enter and skip the MySQL user verification. Note After you enter this command, the command line cannot be manipulated, and you can open a new command line again. Note: End the Mysqld.exe process in Task Manager before entering this command to ensure that the MySQL server end is running.
4. Then directly enter MySQL, do not need to bring any login parameters directly to enter the land database can be logged.
5. Enter show databases; You can see all the database instructions successfully logged in.
6. The MySQL library is where the user name is saved. Input use MySQL; Select MySQL database.
7.show Tables View all the tables, you will find a user table, which is stored in the username, password, permissions and so on account information.
8. Enter select User,host,password from user; To view account information.
9. Change the root password, enter update user set Password=password (' 123456 ') where user= ' root ' and host= ' localhost ';
10. Check the account information again, select User,host,password from user; You can see that the password has been modified.
11. Exit the command line, restart the MySQL database, and try to log in with the new password.
12. Test without password to log in to MySQL, found or able to log on, but the database can only see two databases, the restart after the Skip password verification has been canceled.
13. I have this place to restart the database after the reason is not with the password can still be logged in because my database has a password-less account.
MySQL database modifies user name and password