Create a new MySQL user with super privileges

Gustavo Vendramini

Registered
Mar 19, 2019
2
1
3
Brazil
cPanel Access Level
Root Administrator
I need a user who creates databases and permissions to other users.

I've tried
Code:
GRANT ALL PRIVILEGES ON *. * TO 'myuser' @ 'localhost' WITH GRANT OPTION;
and works temporarily, for some reason WHM clears those permissions from time to time.

I even make a cron that run the command daily
Code:
mysql -e "GRANT ALL PRIVILEGES ON *. * TO 'myuser' @ 'localhost' WITH GRANT OPTION;"
but WHM is also cleaning up this cron periodically.

I also ran the command
Code:
/usr/local/cpanel/bin/dbstoregrants username
after change the grants on yaml files in /var/cpanel/databases/ and it did not work.

How to effectively create a user with GRANT OPTION in WHM?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

To update, it looks like the advice in the support ticket was to create a reseller with root privileges in order for it to setup the necessary MySQL grants. Can you confirm if this advice was suitable for what you're looking to do?

Thank you.