Thread: ah... oops

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Victoria, Australia
    Posts
    104
    Rep Power
    15
    Hi,

    I've accidentally deleted all users from my 'user' table in msyql and so I can't connect to re-add the root user.

    Can anyone tell me how to do this? I'm running mysql 3.23.27-beta on win98.

    Thanks,
    Josh
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Copenhagen, , Denmark
    Posts
    20
    Rep Power
    0

    Have u also set up access rights on DBs/tables? - if not ...

    Haven't tried this, but consider:


    1. Stop mySQL
    2. Copy (or ZIP) your mysqldata directory for backup and take a copy of my.ini (win dir)
    3. rename the mysqldatamysql directory (to whatever)
    4. Reinstall mySQL on top of the old one

    A new mysqldatamysql directory should have been created and populated.


    Hope this helps ....
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Victoria, Australia
    Posts
    104
    Rep Power
    15
    I didn't have any db's or tables in there so I just re-installed the entire mysql dist.

    Thanks for the help.
  6. #4
  7. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    27
    Actually, there is a backdoor, at least in the Linux version. I did something similar, I accidentally denied all users access from localhost, which meant that I had some problems with logging into mysql...
    So I had to restart the mysql with some option thet prevented it from reading the grant tables. I don't remember the option but I found it in the manual, which can be very handy...

    /NoXcuz

Similar Threads

  1. oops
    By ]{ronic in forum PHP Development
    Replies: 4
    Last Post: January 31st, 2004, 09:58 PM
  2. oops
    By amitgpt in forum Web Hosting Offers
    Replies: 0
    Last Post: January 31st, 2004, 09:59 AM
  3. Replies: 1
    Last Post: March 30th, 2002, 11:52 AM
  4. Oops Spoke To Soon!
    By micro in forum PHP Development
    Replies: 3
    Last Post: September 18th, 2001, 04:37 PM
  5. Oops
    By pozoc in forum MySQL Help
    Replies: 1
    Last Post: September 11th, 1999, 02:47 PM

IMN logo majestic logo threadwatch logo seochat tools logo