Step 1
Stop the service of mysqld
service mysqld stop
or
/etc/init.d/mysqld stop
Step 2
connect the mysql to safe mode with following command
mysqld_safe --skip-grant-tables &
now we are in safe mode
Step 3
login as root user with following command
mysql -uroot
Step 4
now provide the following steps
use mysql;
update user set authentication_string=password('12345') where user='root';
flush privileges;
quit
Step 5
Now stop the safe mode with following command restart the mysql
service mysqld stop - it will stop from safe mode
service mysqld start
Step 6
Login with root
mysql -u root -p
That's all all the best ....
Stop the service of mysqld
service mysqld stop
or
/etc/init.d/mysqld stop
Step 2
connect the mysql to safe mode with following command
mysqld_safe --skip-grant-tables &
now we are in safe mode
Step 3
login as root user with following command
mysql -uroot
Step 4
now provide the following steps
use mysql;
update user set authentication_string=password('12345') where user='root';
flush privileges;
quit
Step 5
Now stop the safe mode with following command restart the mysql
service mysqld stop - it will stop from safe mode
service mysqld start
Step 6
Login with root
mysql -u root -p
That's all all the best ....
No comments:
Post a Comment