close

Privacy guaranteed - Your email is not shared with anyone.

Any mySQL guru's here...

Discussion in 'Tech Talk' started by proguncali, Aug 7, 2005.

  1. proguncali

    proguncali 1911-2004 CLM

    Joined:
    Mar 14, 2002
    Messages:
    2,611
    Likes Received:
    7
    Location:
    At your Mom's
    I have run into a recent problem.

    One of my idjit contractors deleted the MySQL root user.

    Am I hosed or is there help.

    I've posted in the mysqlfreaks forums but no reply yet.


    Thanks!
     
  2. fastvfr

    fastvfr Ancient Tech

    Joined:
    Mar 28, 2001
    Messages:
    2,344
    Likes Received:
    0
    Location:
    SW Oregon
    Care to explain how the idjit contractor gained root access to your system?! ;P ;g ;P

    Depending on how you hardened it off, you may be able to get in and set root permissions for a newly created user if you use a little creativity and learn to hack Unix boxes.

    One thing's for sure--you'll never look at SSL the same way again if you ARE able to do so!!

    Chances are, however, that your idjit contractor has performed the ol' hoseroo on your system...

    Lots of luck.
     

  3. proguncali

    proguncali 1911-2004 CLM

    Joined:
    Mar 14, 2002
    Messages:
    2,611
    Likes Received:
    7
    Location:
    At your Mom's

    Some of my guys have root. Someone made a real stupid move and no one is copping to it....yet.

    It's the mySQL root just so we're clear. Not "root."

    We only ssl to that box. That's the only way to connect as it's configured.
     
  4. David_G17

    David_G17 /\/\/\/\/\/\/\/

    Joined:
    Oct 7, 2002
    Messages:
    2,046
    Likes Received:
    0
    try logging into mySQL with the user "admin". I have no idea what happens if you delete root's account. Please keep us updated if you find anything out.


    edited to add...

    try something like this:

    ssh shell> mysql --user=admin mysql
    mysql> GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password';
     
  5. proguncali

    proguncali 1911-2004 CLM

    Joined:
    Mar 14, 2002
    Messages:
    2,611
    Likes Received:
    7
    Location:
    At your Mom's

    No worky....:(
     
  6. GTIMANiac

    GTIMANiac

    Joined:
    Jul 14, 2001
    Messages:
    77
    Likes Received:
    0
    My only suggestion would be to restore the mqSQL db. This is similar to the Master DB in MS SQL.
     
  7. proguncali

    proguncali 1911-2004 CLM

    Joined:
    Mar 14, 2002
    Messages:
    2,611
    Likes Received:
    7
    Location:
    At your Mom's
    <----looking for more of a clue?
     
  8. Washington D.C.

    Washington D.C.

    Joined:
    Oct 13, 2003
    Messages:
    5,218
    Likes Received:
    1
    Location:
    Woestyn Kusdorp
    The documentation for MySQL notes that you can skip the MySQL authentication system on loadtime using the '--skip-grant-tables' load command. With MySQL loaded with no security, you can use either a MySQL admin gui or the MySQL commandline to reset your root password.

    You can find the MySQLadmin tool from http://dev.MySQL.com/downloads/administrator/1.0.html,

    The full command to load MySQL like this is:

    mysqld_safe --skip-grant-tables --autoclose


    For deleted root:


    http://www.mysql.com/doc/R/e/Resetting_permissions.html

    After starting mysql with the --skip-grant-tables, you'll have to
    execute a grant statement

    http://www.mysql.com/doc/G/R/GRANT.html

    GRANT ALL PRIVILEGES ON *.* TO root@localhost INDENTIFIED BY
    'somepassword' WITH GRANT OPTION;

    then restart mysql without the --skip-grant-tables.