Home > Article > Backend Development > Steps to retrieve PHP database password_PHP tutorial
1. Log in to the system as the system administrator.
2. Stop the MySQL service.
3. Enter the command window, and then enter the MySQL installation directory. For example, my installation directory is c:mysql, enter C:mysqlbin
4. Skip the permission check and start MySQL,
c:mysqlbin>mysqld -nt --skip-grant-tables
5. Reopen a window, enter the c:mysqlbin directory, and set a new password for root
c:mysqlbin>mysqladmin -u root flush-privileges password "newpassword"
c:mysqlbin>mysqladmin -u root -p shutdown
Replace newpassword with the root password you want to use. The second command will prompt you to enter a new password. Repeat the password entered in the first command.
6. Stop MySQL Server and start Mysql in normal mode
7. You can use the new password to connect to Mysql. :)