Two Cpanel Servers Using the Same Remote Mysql Server.


Aug 19, 2011
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


Jan 21, 2007
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.