Skip to content

KALI LINUX 2.0 – How To: Reset Linux MySQL Root user password


This video will detail how to reset the root account password on a MySQL database.

Download PDF (3 pages)


Open a terminal as root

service mysql stop

mysqld_safe –skip-grant-tables & (then press enter twice)

mysql -u root (hit enter)

Reset Password:

use mysql;

update user set password=PASSWORD(“yournewpasswordhere”) where user=’root’;

flush privileges;

Restart MySQL:

service mysql restart


mysql -u root -p

enter your password here and hit enter

Type exit and hit enter to quit.



Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: