|
|||
|
MysqlFE::userdbprivs() syntax
Can you please tell me the complete syntax of this function ? I tried with an user having several privileges but the API only returns one.
Here is the XML result : Quote:
My API call is the following PHP Code:
|
|
||||
|
Quote:
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
|||
|
Quote:
http://forums.cpanel.net/developer-c...tml#post531025 I think it worked but it was just an inlusion, it only works with "ALL" option, any other input will fails. |
|
|||
|
Let's do some tests
#1 PHP Code:
#2 PHP Code:
#3 PHP Code:
So how can I do to use this API properly ? Because it's important to not to give all privileges to anyone as it poses some security risk. Most of users will only need "INSERT SELECT UPDATE DELETE". Last edited by lvt; 06-29-2009 at 02:45 PM. |
|
||||
|
Code:
https://SERVER:2083/xml-api/cpanel?user=cPanelUser&xmlin=<cpanelaction> <module>Mysql</module><func>adduserdb</func><apiversion>1</apiversion><args>cpanel_DB</args><args>cpanel_USER</args><args>INSERT DELETE</args></cpanelaction> Acceptable values are as follows: ALL SELECT CREATE INSERT ALTER UPDATE DROP DELETE LOCK INDEX REFERENCES CREATETEMPORARYTABLES The X3 interface places spaces between these values and uses these values in the above order.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
|||
|
Quote:
11.24.4-RELEASE |
|
||||
|
I'll provision a server with the latest RELEASE tonight, should be able to test on it when I'm back in the office tomorrow
.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
||||
|
It's still working for me on:
cPanel 11.24.4-R36167 - WHM 11.24.2 - X 3.9 CENTOS 4.7 i686 standard
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
|||
|
Quote:
Thanks again. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SQL Syntax help | distinctedge | cPanel and WHM Discussions | 6 | 07-15-2008 03:13 PM |
| syntax error | hassnetwork | cPanel Newbies | 3 | 01-18-2006 09:09 AM |
| Syntax Mismatch | ProLamer | cPanel and WHM Discussions | 1 | 08-23-2005 11:49 PM |
| What would this syntax be? | Izkabola | cPanel and WHM Discussions | 2 | 07-04-2005 03:40 PM |
| Please use the this syntax wwwacct | StandBy1 | cPanel and WHM Discussions | 10 | 03-07-2004 01:08 PM |