mysql:password_recovery
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mysql:password_recovery [2016/10/13 23:12] – peter | mysql:password_recovery [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
If you've forgotten your root password, you'll need Linux Root login to reset your MySQL root password. | If you've forgotten your root password, you'll need Linux Root login to reset your MySQL root password. | ||
+ | |||
+ | First login to your Linux box as a root user, and stop the **mysqld** daemon. | ||
<code bash> | <code bash> | ||
- | // First login to your Linux box as a root user, and stop mysqld daemon. | + | service mysqld stop |
- | # service mysqld stop | + | </ |
- | // Now, start the mysqld daemon without the grant table bypassing | + | Now, start the **mysqld** daemon without the grant table bypassing authentication. |
- | // authentication | + | |
- | # mysqld_safe --skip-grant-tables & | + | |
- | // The mysqld daemon should have started. Now login as a root user | + | <code bash> |
- | // without the password. | + | mysqld_safe --skip-grant-tables & |
- | # mysql -u root | + | </code> |
+ | |||
+ | |||
+ | The mysqld daemon should have started. | ||
+ | |||
+ | <code bash> | ||
+ | mysql -u root | ||
mysql> use mysql | mysql> use mysql | ||
+ | </ | ||
- | // Reset the root user password. | + | Reset the root user password. |
+ | |||
+ | <code mysql> | ||
mysql> update user set Password=PASSWORD(' | mysql> update user set Password=PASSWORD(' | ||
mysql> flush privileges; | mysql> flush privileges; | ||
mysql> exit; | mysql> exit; | ||
+ | </ | ||
- | // Restart the mysqld daemon, so that the new password will take | + | Restart the mysqld daemon, so that the new password will take into effect. |
- | // into effect. | + | |
- | # service mysqld restart | + | <code bash> |
+ | service mysqld restart | ||
</ | </ | ||
mysql/password_recovery.1476400346.txt.gz · Last modified: 2020/07/15 09:30 (external edit)