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)