Skip to content
April 29, 2009 / sanjaydalal4u

MySQL Reset Root Password

We can reset root Password using two techniques. First one is using the mysqladmin command and second one is using the mysql safemode technique. I have describe both the technique below. enjoy !!!!!!!!

Technique 1. Using Mysqladmin command

#mysqladmin -u root -p password ‘new-password’

Technique 2. Using Mysql safe mode 

# /etc/init.d/mysql stop

# mysqld_safe –skip-grant-tables  &

# mysql -u root

mysql> use mysql;

mysql> update user set  password=PASSWORD(“newpassword”) where User=’root’;

mysql> flush  privileges;

mysql> quit

# /etc/init.d/mysql stop

# /etc/init.d/mysql  start

3 Comments

Leave a Comment
  1. Rahul / Nov 18 2009 7:41 pm

    Hi,

    Excellent.Nice article thanks for sharing.

  2. password hacking / Apr 3 2013 10:00 am

    Quality posts is the crucial to interest the users to pay a quick visit the website, that’s what this web page is providing.

Leave a comment