SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    mysql root got deleted...help

    It figures, but somebody deleted the root mysql user. I tried the usual methods of mysql_install_db and mysql_fix_privilege_tables (thoug the later is only REQUIRED if you are doing an upgrade) and we still can't get in. What do we do now? How do we completely reinitialise mysql? Thanks.

  2. #2
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Ok I tried completely deinstalling the packages and reinstalling them. When I use:

    shell> mysql -u root mysql

    or

    shell> mysql -u root mysql -p

    I now get the usual "access denied for root@localhost" errors.

    What do I do now? Did I miss a step? Are there some files I need to rm after deinstalling the rpm's?

    Confused.

  3. #3
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try starting mysqld with --skip-grant-tables (or just skip-grant-tables in the [mysqld] section of my.cnf). this will allow anyone to connect to the server and do anything. so be careful! then hopefully you can use the GRANT command, phpMyAdmin, whatever to get the root user back.

    then don't forget to remove the skip-grant-tables option and restart MySQL.

    i hope that'll help.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  4. #4
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    You know what, I actually tried something similar to that last night. It still didn't work. I did some poking aroun after deinstalling all the packes again and found that simply deinstalling the packages isn't enough. There are still a bunch of files resident. When I reinstalled the packages, the old db files were never overwritten. I got it fixed by completely removing mysql, including the rouge files and then reinstalling the packages. Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •