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.

[Case 92945] Skipping grants for these MySQL databases: username_%

Discussion in 'Database Discussions' started by TomKu, Mar 4, 2014.

  1. TomKu

    TomKu Member

    Joined:
    Oct 10, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    I am testing pkgacct/restorepkg and it fails to transfer grants for username_%
    The grants are defined in source MySQL as
    GRANT ALL PRIVILEGES ON `username\_%`.* TO 'username'@'localhost'


    From WHM 11.40.1 (build 11) to 11.42.0 (build 17)
    From MySQL 5.5.35 to MySQL 5.5.36
    From pkgacct to restorepkg

    Error message is:
    Skipping grants for these MySQL databases: username_%. These databases don't exist in the archive

    Do you have any ideas what can be the reason?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you open a support ticket using the link in my signature so we can attempt to reproduce this issue? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  3. TomKu

    TomKu Member

    Joined:
    Oct 10, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    Thank you. Ticket #4628915.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, an internal case has been opened to address /scripts/resotrepkg skipping wildcard grants for users when restoring cpmove archives. The internal case number is 92945. The current workaround is to add the grants manually. Here is an example:

    Code:
    mysql> GRANT ALL PRIVILEGES ON `abc\_%`.* TO 'abc'@'localhost';
    Thank you.
     
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    619
    Likes Received:
    6
    Trophy Points:
    18
    Where one can grant these privileges pls?, i have same issue with "%. These databases don't exist in the archive."
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Each database should have specific grants, so wildcard grants are not required when the account is packaged. Please confirm if you have any actual issues with your database since it's been restored.

    Thank you.
     
  7. TomKu

    TomKu Member

    Joined:
    Oct 10, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    When restoring cpbackup (user.tar.gz) from Nov 2013 in WHM 11.42.1 (build 12) :

    Restoring MySQL databases....
    Restoring database user_zzdb......
    Restoring MySQL privs
    Skipping grants for these MySQL databases: user_%. These databases don't exist in the archive.

    Privileges in MySQL are then only set for the restored databases(s) like:
    GRANT ALL PRIVILEGES ON `user\_zzdb`.* TO 'user'@'localhost'

    When you add a new database in cPanel, the wildcard grant
    GRANT ALL PRIVILEGES ON `user\_%`.* TO 'user'@'localhost'
    is getting added automatically to grants list and stays there until you kill the account.

    So this 'Skipping grants for these... user%' sounds alarming (shoudn't it be dismissed?)
    but the restored account works and additional databases can be created.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Wildcard grants are no longer set in cPanel version 11.44. You should see no ill effects when the wildcard grant is not restored, as it's an intended change when restoring an account that was merged ahead of time.

    Thank you.
     
Loading...

Share This Page