List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:May 12 1999 3:49am
Subject:Re: lost the root account
View as plain text  
David Johnson wrote:
> 
> After we had a mysterious database crasher, the root account/password no longer seems
> to work.  We don't know what could have happened to it.  There one minute, gone the next.
> 
> Since this is our production database, is there any way to reset root privileges
> without stopping or reinstalling the database?
> 
> DJ

There is a trick you can do that I suppose will work.
Zero downtime.

- install mysql on another machine ( make sure it is the
same version)
- manually copy the entrire contents of
$MYSQL_DIR/data/mysql to the corresponding directory on
the other installation
- start mysql on the other machine with
--skip-grant-tables
- insert the new root password into user table
- copy the contents of $MYSQL_DIR/data/mysql back to
your production server

There might be a more elegant way, but this will do the
job.

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
lost the root accountDavid Johnson12 May
  • Re: lost the root accountSasha Pachev12 May
  • Re: lost the root accountVan12 May
    • Re: lost the root accountRyan Larson12 May