PHP for Database creation

389 views
asked Nov 4, 2013 in Database by darkshark (1,500 points)
Hi all
I am looking for a way in PHO to create a WHM Database and a new MySQL user. I want to automatically add the database using a script so that everytime a new account is created this script is called to configure a database. Is this possible ? and how?
Thanks

2 Answers

0 like 0 dislike
answered Nov 4, 2013 by A007 (360 points)
Try using the API for the database functions.  Check this
http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/WebHome
0 like 0 dislike
answered Nov 4, 2013 by tareq101 (4,880 points)
use the API1 functions for MySQL instead
http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api1/ApiMysql
...