[CentOS] Locked myself out of MySQL

Sat Mar 26 20:45:37 UTC 2011
Robert Heller <heller at deepsoft.com>

At Sat, 26 Mar 2011 13:24:40 -0700 CentOS mailing list <centos at centos.org> wrote:

> Darn!  I must have either made a typo or my use of a ";" in the 
> MySQL root password so now I am locked out.
> Is there a work around or do I have to uninstall MySQL and reinstall?

Is the data in the database expendable (or is the database empty)?

Do you have a database backup?

If either of the above, you can probably just do a rm on the MySQL
database (after *stopping* the MySQL daemon!) and have MySQL create a
fresh, empty database using the MySQL first time install script.  And
then set the password properly and/or restore the backup (if necessary
you can edit the backup file if the password there is 'bad').

> Todd

Robert Heller             -- 978-544-6933 / heller at deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments