Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    2

    Question How to get the list of MySQL databases used by an account/domain?

    Hi,

    I need some assistance in getting the list of MySQL databases being used for a particular user account / domain via cpanel API. I have searched for a way to get the list, but no luck so far.

    Does anyone know how to get the list of MySQL databases used for an account? Not all the MySQL databases, but those attached to a particular account alone.

    I expected the MySQL databases names in the output for the following API function:
    DomainUserData < AllDocumentation/AutomationIntegration < TWiki

    But they were absent!

    Hope someone will help me on this.

    Many thanks in advance,
    RN Joseph.

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default Re: How to get the list of MySQL databases used by an account/domain?

    Hello,

    I think you're looking for MysqlFE::listdbs . If you're using it in a cPanel page, take a look at this doc for how to make frontend API2 calls. If you're making the call remotely, look at this doc about invoking API1 and API2 calls via the XML-API. And finally, if you're making a remote call with PHP, you can use the api2_query() method in the XML-API PHP client class.

    If you need any help invoking that call or have any other questions, let me know!

    Best Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    2

    Talking Re: How to get the list of MySQL databases used by an account/domain?

    Exactly, that is what I want. I will try that. If I have any more queries, I will get back to you. Thank you very much.

    RN Joseph.

Similar Threads & Tags
Similar threads

  1. Account migration without MySQL databases
    By bin_asc in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-25-2010, 03:44 PM
  2. Moving MySQL databases from one account to another
    By pumpkinkid in forum Database Discussions
    Replies: 11
    Last Post: 02-16-2010, 08:51 AM
  3. Creating an account backup without the MySQL databases?
    By Kadence in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-19-2009, 11:35 PM
  4. API to get list of databases for an account?
    By simonpearce in forum cPanel Developers
    Replies: 6
    Last Post: 03-23-2009, 03:55 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube