Results 1 to 2 of 2

Thread: Restore ALL USER privileges etc. MySQL

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    4

    Default Restore ALL USER privileges etc. MySQL

    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'
    Last edited by walterdevos; 06-20-2012 at 07:26 AM.

  2. #2
    Member
    Join Date
    Nov 2010
    Location
    Mexico
    Posts
    80
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Restore ALL USER privileges etc. MySQL

    I just had the exact same situation... how did you solved this???
    Cheers,

    CIO @Diseņo Web G4A

Similar Threads

  1. Account Restore Failed (mysql user)
    By ipvhost in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 01-09-2012, 04:50 PM
  2. [Case 49886] MySQL: Manage user privileges page doesn't fully load.
    By maisemconta in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 05-23-2011, 04:12 AM
  3. Replies: 1
    Last Post: 03-13-2011, 01:16 AM
  4. MySQL User privileges
    By emu7 in forum Data Protection
    Replies: 6
    Last Post: 08-21-2009, 01:57 PM
  5. No user selected when attempting to restore MySQL db.
    By charleyhankins in forum Data Protection
    Replies: 1
    Last Post: 04-22-2009, 02:05 PM