MySQL password change instance details, mysql password change details
MySQL password change instance details
I haven't used MySQL for a long time. Today, when I opened HediSQL to connect to mysql, I found that the root password was forgotten. I tried to change the password for a while and recorded it for later use. (Win10 Local Operation)
Close MySQL service: net stop MySQL opens the cmd Console window as an administrator and enters the bin directory of the MySQL directory, execute mysqld -- skip-grant-tables and open another cmd window to directly execute the mysql Command (because operation 2 can access the table without authorization, you can directly use mysql, log on without the username and password.) switch to the mysql database: uses mysql. Modify the password field of the user table: update user set password = password ('000000') where user = 'root '; execute the refresh operation: flush privileges; exit mysql: quit; restart MySQL service: net start MySQL
Step 2. Start the MySQL server
Step 3-7: Change the User Password
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!