Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

API2 commands for MySQL

Discussion in 'cPanel Developers' started by ck, Jul 15, 2010.

  1. ck

    ck Member

    Aug 15, 2001
    Likes Received:
    Trophy Points:
    Hi there

    I am trying to build some commands to interact with a cPanel account's MySQL functions. I've already successfully coded most of the parts, but would like to know whether there is an API2 command for managing assigning database user permissions to a particular database? Right now, we already have coded the functions to assign and remove a particular user to a database. What I am looking for is how to assign different permissions, such as the way cPanel allows it in the x3 control panel to select different permissions, for example alter, select, etc.
  2. cPanelDavidN

    cPanelDavidN Integration Developer

    Dec 17, 2009
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi ck,

    This is what you're looking for: ApiMysql < ApiDocs/Api1 < TWiki

    "adduserdb" an API1 call. Unfortunately there isn't an API2 equivalent. To reassign new privileges, you'll need to run "deluserdb", ApiMysql < ApiDocs/Api1 < TWiki, (which essentually drops the user privileges row in mysql.db).

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice