MYSQL RESET ROOT PASSWORD IN REDHAT

step:1.stop mysql database service.

sudo /etc/init.d/mysqld stop




step:2.open mysql safe mode use this command    

sudo mysqld_safe




step:3.   login to root user

mysql -u root





step:4.use any database .

use mysql;



 step.5.use this command

update user set authentication_string=PASSWORD('mynewpassword') where User='root';

flush privileges;

quit



step:6.stop mysql database service.

sudo /etc/init.d/mysqld stop

step:7.start mysql database service

sudo /etc/init.d/mysqld start


step.8. login to mysql use new password

mysql -u root -p

Comments

Post a Comment

Popular posts from this blog

MySQL Replication Switchover: Step-by-Step Guide

How to create database manually in oracle 11g R2

How To Install and Configure Innodb Cluster /shell/Router