One of the recovery methods for a .MySQL passwordIf you forget the MySQL root password, you can use the following methods to re-set:1. Switch to rootSu root2. KILL out of the system in the MySQL process;Killall -TERM mysqld3. Start MySQL with the following command to start without checking the permissions;Safe_mysqld --skip-grant-tables &4. Then use the empty password to use the root user login to MySQL;Mysql -u root5. Modify the root user's password;Mysql> update mysql.user set authentication_string= PASSWORD ('123456') where User = 'root';Mysql> flush privileges;Mysql> quitRestart MySQL, you can use the new password login.Second, the MySQL password recovery method IIThere may be no system safe_mysqld procedures (ubuntu operating
system, apt-get installed mysql), the following method can be restored1. Switch to rootSu root2. stop mysqld;
/etc/init.d/mysql stop3. Start MySQL with the following command to start without checking the permissions;Mysqld --skip-grant-tables &4. Then use the empty password to use the root user login to MySQL;Mysql -u root4. Modify the root user password 123456 (of course, you need to 123456 into the password you want to set);Mysql> update mysql.user set authentication_string= PASSWORD ('123456') where User = 'root';Mysql> flush privileges;Mysql> quitReboot MySQL/etc/init.d/mysql restartYou can use the new password 123456 login.
Mysql have changed the column "password" to "authentication_string"
Subscribe to:
Post Comments (Atom)
fixed: embedded-redis: Unable to run on macOS Sonoma
Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...

-
Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...
-
Introduction In distributed systems, maintaining context across microservices is crucial for effective logging and tracing. The Mapped Di...
-
If you do not config mail up for your ghost blog, it maybe a big problem once you lost your user password. however, methods are always mor...
No comments:
Post a Comment