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!

Two Cpanel Servers Using the Same Remote Mysql Server.

Discussion in 'Database Discussion' started by rshafer, Sep 19, 2011.

  1. rshafer

    rshafer Registered PartnerNOC

    Aug 19, 2011
    Likes Received:
    Trophy Points:
    First I would like to point out that I understand that this is not currently a supported configuration. Therefore I will not ask that you magically give me the tool to make it work. Currently there is a cpanel server lets says cp1 and there is a mysql server called mysql. The customer has ran the remote mysql setup tool and has cp1 using mysql for all of its sql transactions.

    The goal is to add a second cpanel server (cp2) and to have it also use mysql server just like cp1. As long as the user accounts are different the fact that the usernames are prefixed is not an issue in fact I would like to add prefixes to the databases like, horde, eximstats, cphulk, mysql and the others that cpanel uses. I am afraid to run the remote mysql setup on cp2 because I am afraid of all of the potential conflicts that would arise between the databases that cpanel/whm uses that are not for user accounts.

    I would like to know how I can change the configs of the built in services of cpanel that use mysql databases so that I could for example create a db called cp2_[database name] so that the databases would not conflict with the ones that cpanel install from cp1 has already created on mysql. If this is possible where in the configs could I change the databases that therse servers use. I an currently running CentOS on all servers and the newest version of mysql.

    I hope that this is clear and I am thankful for any help that anyone can provide, thank you.

    Ryan Shafer
  2. uhhosting

    uhhosting Member PartnerNOC

    Jan 21, 2007
    Likes Received:
    Trophy Points:
    I was going to post something very similar today!

    I would dearly love there to be better support when running this kind of setup. The easiest way I can see doing it, is to add a server prefix on to each database:


    1 being the server number. Or 1user_dbname to avoid having too many underscores.

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