Portal Home > Knowledgebase > Articles Database > cPanel enable access through single db use to all mysql dbs under reseller


cPanel enable access through single db use to all mysql dbs under reseller




Posted by WindsOfChange, 08-09-2013, 10:39 AM
A reseller on cPanel server wants us to enable access to all mysql dbs under reseller through a single DB user. They want this to manage all the DB via remote/scripts. I told them to move to a VPS. They like it as is and want this feature. Is there a script that I can run via cron which would manage the all dbs under reseller? i.e.: when they add/delete a mysql db under any cpanel account under their reseller, the script will assign/remove rights to db user.... Wish cPanel would just implement this!

Posted by Pesarak, 08-11-2013, 03:29 AM
Dear Your Customer Accounts are theirs. Their Databases are theirs. then you cannot do this. Regards.

Posted by brianoz, 08-11-2013, 04:20 AM
You could probably write a script to run under mysql as the root user and grant access to a fixed user to all reseller databases. It's not trivial though, and it's a very specialized requirement, so I'd charge the reseller for it.

Posted by whmcsguru, 08-11-2013, 06:18 PM
writing a script is probably going to be the best way about this. Not too complicated, just a simple would have to be done every time their users create a database (not typically but once or twice a week, honestly), but this is the best way to do it.

Posted by BestServerSupport, 08-12-2013, 01:55 AM
You just need to run following query on MySQL db (default DB of MySQL server): GRANT ALL ON mydb.* TO 'myuser'@'%' IDENTIFIED BY 'myuserpwd'; FLUSH PRIVILEGES;



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
vpseasy.com. down (Views: 670)

Language: