List:General Discussion« Previous MessageNext Message »
From:Walter Heck - OlinData.com Date:August 26 2009 12:17am
Subject:Re: recovery help needed
View as plain text  
Hey Joe,

stop the server, start it with --skip-grant-tables, change the root
entry in mysql.user to your liking, and then restart the server
without --skip-grant-tables.

viola!

Walter

On Wed, Aug 26, 2009 at 02:12, Joe<mysql.com@stripped> wrote:
> We have an inaccessible MySQL v5.0.45 DB (w/Innodb) we really
> need some help regaining access to.  While attempting to
> adjust/add remote user access, we accidentally did the
> following:
>
>  use mysql;
>  update user set host = 'SomeBogusIP' where user = 'root';
>
> Now, we can't get into the DB to fix it:
>
> # mysql test
> ERROR 1044 (42000): Access denied for user ''@'localhost' to
> database 'test'
> # mysql mysql
> ERROR 1044 (42000): Access denied for user ''@'localhost' to
> database 'mysql'
>
> We are not MySQL experts by any stretch, so any help is
> appreciated.
>
>
> Here are the files we evidently touched:
> # ls -ltr /var/lib/mysql/mysql/
> -rw-r----- 1 mysql mysql   5256 Aug 25 17:33 db.MYD
> -rw-r----- 1 mysql mysql    844 Aug 25 17:35 user.MYD
> -rw-r----- 1 mysql mysql   2048 Aug 25 17:50 user.MYI
> -rw-r----- 1 mysql mysql   4096 Aug 25 17:50 db.MYI
>
> We do have a months-old copy of the 'mysql' db directory.
>
> Thanks in advance.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
Thread
recovery help neededJoe26 Aug
  • Re: recovery help neededWalter Heck - OlinData.com26 Aug
    • Re: recovery help neededJoe26 Aug
      • Re: recovery help neededTodd Lyons26 Aug
      • Re: recovery help neededMartijn Engler26 Aug
        • Re: recovery help neededprabhat kumar26 Aug
  • Re: recovery help neededCarlos Proal26 Aug