2 like 0 dislike
57 views

How to RESETTING MYSQL ROOT PASSWORD [IN CASE we FORGOT PASSWORD]

in Education & Reference by (810 points) | 57 views

3 Answers

0 like 0 dislike
Best answer

run the below command

[root ~]#service mysqld stop
[root ~]#mysqld_safe --skip-grant-tables

open the server in a new session and open the mysql without the password

[root ~]# mysql
mysql>use mysql;

For MySQL < 5.5

mysql>update user set Password=PASSWORD('new-password') where user='root';
mysql>flush privileges;
mysql>exit;

For MySQL 5.7

mysql>update user set authentication_string=PASSWORD('new-password')  where user='root';
mysql>flush privileges;
mysql>exit;
by
selected by
0 0
update the below column too

set password_expired ='N'
0 like 0 dislike

run the below command

[root ~]#service mysqld stop
[root ~]#mysqld_safe --skip-grant-tables

open the server in a new session and open the mysql without the password

[root ~]# mysql

mysql>update user set Password=PASSWORD('new-password') where user='root';
mysql>flush privileges;
mysql>exit;
by
0 like 0 dislike

update the below column too

set password_expired ='N'

by

Related questions

0 like 0 dislike
1 answer
asked Dec 13, 2018 in Education & Reference by Neha (620 points) | 200 views
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Feb 17, 2014 in Education & Reference by Simmi (520 points) | 76 views

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,202 questions
1,348 answers
553 comments
1,994 users