any chance you have a copy of the $MYSDATADIR/mysql/ directory on a tape
backup or something like that. You could then just put those back and
On Wed, 12 May 1999, Van wrote:
> Sasha Pachev wrote:
> > 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.
> I dunno about that Sasha. What kind of hits are you taking? If it's
> slow, then, this might work, since it could take upwards of 15-30
> minutes to put all this together.
> I usually put 2 to 3 additional admin accounts into the mysql/user table
> with grant rights to provide for such situations (without drop
> privileges). If you guys do the same, perhaps, you can use one of these
> "backdoor" accounts to do a mysqladmin refresh -ubackdooruser -p
> Then, try (as backdooruser):
> UPDATE user SET password=password('password')
> WHERE host = 'localhost' AND user = 'root'
> mysqladmin refresh -ubackdooruser -p
> This can be done without disturbing the operations going on if the
> you're concerned about loss of continuity in operations. (i.e. sites
> with proprietary username/authentication schemes, etc.).
> Linux rocks!!! www.dedserius.com
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread3244@stripped
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.