|
|||
|
Remote database creation
Hi all,
I've looked through the API docs but couldn't seem to find what I'm looking for. I'm looking for a way to remotely create/delete/edit databases and database users using only the user's cPanel login username and password. I've seen a reference to "adduserdb", but didn't see it in the API docs. Here is a sample of what I saw: Code:
user=$cpanel_username&xmlin=".urlencode("<cpanelaction><module>Mysql</module><func>adduserdb</func><apiversion>1</apiversion><args>".$cpanel_username."_$mysql_database</args><args>".$cpanel_username."_$mysql_username</args><args>ALL</args></cpanelaction>
Thanks a lot! Cagy |
|
|||
|
There is a way to do this via CLI, using one of cPanel's cPwrap scripts, this is subject to change at any time:
Code:
/usr/local/cpanel/bin/mysqlwrap ADDDB foobar Code:
<cpanelaction> <apiversion>1</apiversion> <module>Mysql</module> <func>adddb</func> <args>foobar</args> </cpanelaction> |
|
|||
|
Unfortunately at this time I am not aware of any such documentation, although you can strace it out of cpsrvd if you are familiar with process tracing.
|
|
|||
|
check if it helps you anyway:
The HungryCoder » Blog Archive » cPanel database administering class |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Automatic importing of database on account creation | Phoenix cg | cPanel and WHM Discussions | 0 | 02-21-2008 05:03 PM |
| Database creation bug. | beddo | cPanel and WHM Discussions | 1 | 02-20-2008 01:36 PM |
| Postgres database creation issue ( wrapper ) | parisdns | cPanel and WHM Discussions | 1 | 10-08-2007 03:14 PM |
| Remote package creation | anarckie | cPanel and WHM Discussions | 2 | 05-29-2004 02:01 PM |
| Remote Database Access | voxtreme-fred | cPanel and WHM Discussions | 0 | 06-19-2002 11:30 PM |