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!

API/Script to identify in which host a MySQL db exists?

Discussion in 'cPanel Developers' started by nesanjoseph, Oct 14, 2011.

  1. nesanjoseph

    nesanjoseph Active Member

    Dec 31, 2010
    Likes Received:
    Trophy Points:
    Hi all,

    I was using the local MySQL server for some of the user accounts and then recently I set up a remote MySQL Server for cPanel use. At present, for a single user, 2 databases are existing in the local machine [where cPanel is installed] and 3 databases are existing in the remote MySQL Server.

    Now, when I login to the cPanel console, I am able to see all the 5 databases listed. But I may not be able to identify which DB belongs to which MySQL Server.

    The same confusion comes to me when I list the databases using MysqlFE::listdbsbackup() also. This API call lists all the databases, but this does not tell me which DB belongs to which MySQL server.

    Could any of you please guide me if there is a way to get these information?

    Many thanks in advance,
    Nesan Joseph R.

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