Home » Tutorial

mySQL reset root password

Written By: techieDan on May 7, 2008 No Comment

I’ve been using mysql for quite some time, and ever then after I shifted to a work place which uses msSQL, I felt that I’ve neglected mySQL for awhile. Basically one main question I had previously and just recently asked by my colleague is to how to change the root user password?

Here I will teach you what I usually use which is the mysql command line.

Login to mysql server using the following command prompt

$ mysqladmin -u root -p

In mysql prompt, select database mysql

mysql> use mysql;

Now update your root password by putting a new password in the NEWPASSWORD part

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

Finally you’ve completed the step. Oh one more final step.

mysql> flush privileges;

Now try quit the mysql command line, and relogin again using the new password. Congrats, your root has a new password :)

Related Posts with Thumbnails

Tags:

Digg this!Add to del.icio.us!Stumble this!Add to Techorati!Share on Facebook!Seed Newsvine!Reddit!Add to Yahoo!

Leave a Reply:

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  Copyright © 2009 TechieDan, All rights reserved.| Powered by WordPress