Home > Ubuntu > How To Reset the MySQL Password : Ubuntu 7.10

How To Reset the MySQL Password : Ubuntu 7.10

I found myself toying with one of my test servers the other nite and realized that I didn’t know what the root password was for my MySQL database.  After a quick bit of Google searching I found a very easy solution.  Granted this may be limited to recent releases of Ubuntu (tested on Ubuntu 7.10), but other solutions did not work for me.

Resetting the Password

To reset the MySQL root password on Ubuntu we can simply reconfigure the installed package, which prompts for the root user password setting at installation.

sudo dpkg-reconfigure mysql-server-5.0

This should display a dialog box asking for a new root user password.  Enter a new password and it’s reset.  Can’t be much simpler than that.

If this article has been helpful, please consider linking to it.

Categories: Ubuntu Tags:

Related Posts

  1. dave
    January 8th, 2008 at 14:10 | #1

    without reconfiguring check this simple command to change mysql root password
    http://www.ubuntugeek.com/reset-the-root-password-on-mysql.html

  2. January 9th, 2008 at 16:38 | #2

    Or just use
    # mysqladmin password NEWPASSWORD

    As root

  3. dns
    January 10th, 2008 at 03:14 | #3

    from the mysql docs
    http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
    m
    ysqld_safe –skip-grant-tables -u root &

  4. February 19th, 2008 at 10:21 | #4

    Looks like the ‘reset-password’ function that a lot of other sites mention for this problem has been removed from the init.d script in ubuntu 7.10.

    Thanks, this is just what I needed. I can stop cutting myself now. :-)

  5. gnuskool
    March 3rd, 2008 at 13:30 | #5

    This works great, thumbs up geezer. I read heaps of different methods etc infinitum, yours worked straight away

  6. May 22nd, 2009 at 17:58 | #6

    this works.. very thanks…

  7. Edward
    July 8th, 2009 at 10:24 | #7

    does the job – thanks

  8. Mike
    July 12th, 2009 at 19:11 | #8

    great tipp – thanks

  9. ANONYMOUS
    July 19th, 2009 at 18:01 | #9

    Worked perfectly and faster than most methods which didn't work very well.

  10. September 9th, 2009 at 23:02 | #10

    Justin’s instructions were very easy, just one line in Terminal!

    # mysqladmin password NEWPASSWORD

    As root

    Works good! Thanks.

  11. January 15th, 2010 at 13:20 | #11

    Hey,
    thanks a lot of for your greatful help! It´s was very helpfull on my Ubuntu-System.

    Regards
    Tom

  12. mike
    March 9th, 2010 at 11:32 | #12

    Thanks!!