User Tools

Site Tools


mysql:password_recovery

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mysql:password_recovery [2016/10/13 23:12] petermysql: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.  Here is the steps for resetting forgotten MySQL root password. If you've forgotten your root password, you'll need Linux Root login to reset your MySQL root password.  Here is the steps for resetting forgotten 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+</code>
  
-// 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.  Now login as a root user without the password. 
 + 
 +<code bash> 
 +mysql -u root
 mysql> use mysql mysql> use mysql
 +</code>
  
-// Reset the root user password.+Reset the root user password. 
 + 
 +<code mysql>
 mysql> update user set Password=PASSWORD('new-password') where user='root'; mysql> update user set Password=PASSWORD('new-password') where user='root';
 mysql> flush privileges; mysql> flush privileges;
 mysql> exit; mysql> exit;
 +</code>
  
-// 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
 </code> </code>
  
mysql/password_recovery.1476400346.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki