There is an error message when connecting with navicat. The password should be wrong, but the root password has been forgotten.
Related recommendations: "Navicat for mysql graphic tutorial"
under windows
1. Run cmd as system administrator.
2. Check whether mysql has started. If it has started, stop: net stop mysql.
3. Switch to the MySQL installation path: D:\WAMP\MySQL-5.6.36\bin; if the environment variable has been configured, there is no need to switch.
4. Enter at the command line: mysqld -nt --skip-grant-tables
5. Restart a cmd command window as an administrator and enter: mysql -uroot -p, Enter to enter the database.
6. If you don’t want to change the password and just want to see the original password, you can execute this statement on the command line.
select host,user,password from mysql.user;//即可查看到用户和密码。
7. If you want to change the password, execute the following statements in sequence on the command line.
use mysql update user set password=password("new_pass") where user="root";// 'new_pass' 这里改为你要设置的密码 flush privileges; exit
8. Restart MYSQL and enter your password to log in!
The above is the detailed content of What should I do if I forget my Navicat password?. For more information, please follow other related articles on the PHP Chinese website!