The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API2 commands for MySQL

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

  1. ck

    ck Member

    Joined:
    Aug 15, 2001
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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).

    Regards,
    -DavidN
     
Loading...

Share This Page