2 like 0 dislike
39 views

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

asked Sep 11, 2017 in Education & Reference by Krish (800 points) | 39 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;
answered Sep 11, 2017 by billy
selected Sep 11, 2017 by Krish
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;
answered Sep 11, 2017 by billy 1 flag
0 like 0 dislike

update the below column too

set password_expired ='N'

answered Sep 19, 2017 by sawpa

Related questions

0 like 0 dislike
1 answer
asked Dec 13, 2018 in Education & Reference by Neha (570 points) | 138 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 (510 points) | 59 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

Mathe Forum Schule und Studenten
1,186 questions
1,324 answers
277 comments
1,638 users