The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Restore ALL USER privileges etc. MySQL

Discussion in 'Data Protection' started by walterdevos, Jun 20, 2012.

  1. walterdevos

    walterdevos Member

    Joined:
    Apr 30, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Situation:
    Somehow the mysql.user table got emptied. No more root access, all websites that used the database (shared hosting) were down. Reason unknown.

    I restored root password and access. So far so good.

    Now I need to restore the users' accounts and privileges. <- BAHM problem!!

    WHM is configured to backup, and to backup account data, whatever that means because I could not find a backup of the mysql system data. (only users' databases were tar.gz-backuped).

    So I dropped the user table completely, and restoring it from the files in the "full backup". (these are no sql-dumps, but a copy from the var/lib/mysql/mysql directory.

    That fixed the users, but it didn't fix the access to the database (privileges?). At that point I got completely stuck.

    Desperately i decided to stop the database, and just copy the whole var/lib/mysql/mysql (containing the frm,myd and myi files) just like that. Didn't care for ibData etc. (i was desperate).

    Now, surprisingly that worked. All clients sites are up, database access is restored.

    Now something must by fishy about this. Nothing is that easy. Should I run some tests, fixes, scripts? Please advise.


    =>update: Found that it occurred seconds after CPanel was updated <=
    [20120620.000703] Detected version '11.32.3.19' from version file.
    [20120620.000703] Target version set to '11.32.3.21'
     
    #1 walterdevos, Jun 20, 2012
    Last edited: Jun 20, 2012
  2. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    16
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    I just had the exact same situation... how did you solved this???
     
Loading...

Share This Page