Q. How to recover forget root password ?
if you forget root mysql password so If you want to recover mysql password & reset new password .
Step 1 : STOP mysql service
#systemctl stop mysqld
Step 2:
#mysqld_safe --skip-grant-tables &
Step 3: Login in mysql
#mysql -uroot ( Enter )
Step 4: Reset new password
#use mysql (Change database)
# update USER set password=password('NewPassword') where User='root' ;
#flush privileges;
#quit
Step 6: Restart mysql server and resolve issue.
#systemctl restart mysqld
No comments:
Post a Comment