Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Restore ALL USER privileges etc. MySQL

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

  1. walterdevos

    walterdevos Member

    Apr 30, 2011
    Likes Received:
    Trophy Points:
    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 '' from version file.
    [20120620.000703] Target version set to ''
    #1 walterdevos, Jun 20, 2012
    Last edited: Jun 20, 2012
  2. luigidelgado

    luigidelgado Well-Known Member

    Nov 6, 2010
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    I just had the exact same situation... how did you solved this???
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice