jusupov.com

Computer Technology Blog

How to reset MySQL root password in Ubuntu Linux

with 2 comments

In case you have forgotten your root password on your Ubuntu Linux, here’s a small tip on how to reset it.

$ sudo mysqld –skip-grant-tables &

$ mysql -u root mysql

$ mysql> UPDATE user SET Password=PASSWORD(’MyNewPasswordHere’) WHERE User=’root’;

$ mysql> FLUSH PRIVILEGES;

$ mysql> \q

$ sudo /etc/init.d/mysql restart

Now you can login using your new root password.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Furl
  • StumbleUpon
  • Technorati
  • Facebook
  • Twitter
  • Yahoo! Bookmarks

Written by Arstan

January 18th, 2008 at 9:58 am

Posted in Linux, Open Source

2 Responses to 'How to reset MySQL root password in Ubuntu Linux'

Subscribe to comments with RSS or TrackBack to 'How to reset MySQL root password in Ubuntu Linux'.

  1. Oh my! Thanks for this simple guide I’m bookmarking it :-)

    I use postgres regularly and I’m totally dumb with mysql commands during the occasional use!

    Andrej

    27 Jan 08 at 11:53 pm

  2. Postgres is way to go! Although its kinda advanced

    Arstan

    31 Jan 08 at 12:53 am

Leave a Reply

You must be logged in to post a comment.