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

TomKu

Member
Oct 10, 2011
20
1
53
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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.
 

postcd

Well-Known Member
Oct 22, 2010
721
21
68
Where one can grant these privileges pls?, i have same issue with "%. These databases don't exist in the archive."
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Where one can grant these privileges pls?, i have same issue with "%. These databases don't exist in the archive."
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.
 

TomKu

Member
Oct 10, 2011
20
1
53
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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.
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.