cPanel & WHM Version 108 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!
This object is in archive! 

Remote mySQL server for multiple cPanel server

Daniel Berthiaume shared this idea 8 years ago
Open Discussion

To offload our web servers, I would like to be able to have one very fast (and with a lot of RAM) MySQL remote servers that would allow more than one cPanel web server to connect to it.

This would involve that before cPanel create an account, it would need to make sure that there is no duplicate user in the database first.

All the Web server connected to the MySQL remote server should have prefix for all cpanel related database (stats, roundcube, etc) EX: SERVERNAME_roundcube.

The servers connected to the MySQL server would also need a method to synchronize the MySQL Password with all servers.

Replies (4)


I do have a few comments regarding this that I'm interested on customer feedback.

(1) How do you see the system(s) handling server hostname changes? For instance, as it stands we allow MyDNS to be deployed on a single MySQL Server. It does so via the exact methodology you've provided (serverhostname_mydns). However, when the server's hostname changes, the DB name remains the same -- which would be unintuitive and possibly cause confusion. "Renaming" a DB to match the hostname would very plausibly cause downtime.

How would you see the system accommodating server hostname changes? Or, does it not and simply require a manual name be entered that does not/can not change?

[2] As it stands, cPanel & WHM systems are not reliant on any outside system inherently. They are self-sustaining and only problems on that system affect that system. By deploying a configuration where multiple cPanel & WHM servers connect to a single MySQL server, you're reducing fault tolerance and creating a situation where many servers will be affected by a single server's outage (in this case, the MySQL server goes offline or becomes unavailable and all MySQL consuming sites on all servers dependent on it become unusable).

Are you prepared to accommodate and deal with the increased risk of failure by this design?

While this other feature is a much bigger task to implement, the feature at seems like it would be a necessity and a pre-requisite to anything like this happening.

I'd love to hear feedback on this and how others would expect or want this particular feature request to pan out, as well as the awareness of the downsides to this particular design.


Greats point to check! I’ve totally forgot about the hostname change possibility!

I would suggest separating the database prefix and hostname. Default setting would make them the same value, but in the Basic Setting section, I would add the "cPanel_database_Prefix” option with a large red warning that changing the database prefix will cause server downtime.

This way, you could change the host name without changing the database prefix and would still be able to trace back which server is using which prefix. (Ideally, you

don’t change the host name at all! But we never know!)

For the second problem, on our part, we have regular snapshot of our SAN and we would also have a running clone in a separate datacenter. But as far as cPanel is concerned, I would love to see a cPanel Database Edition (Similar to the DNS Edition) that would eventually allow clustering of multiple cPanel database servers with a Heartbeat between them.

(Add to this the possibility to either have MariaDB, MySQL and I’m in cPanel heaven! :D)


I would love to see this implemented for sure, since using loadbalancers, a lot of options break and this is one of them...


I too would love to see something like the suggestions here. Both the original topic and the "Database Edition" sound like excellent ideas. I work with Load Balanced setups every day, running multiple cPanel servers with a single DB server back-end. The DB servers are usually a high availability solution of their own so we shouldn't worry about the potential of a single point of failure between the two. I would have to say that this is most beneficial for Load Balanced situations and anyone working with LBs would know their DB would need to be an HA solution already.

My thoughts on the database naming convention. Instead of using hostnames to differentiate between hosts in mysql. How about a uid system, where hostnames are stored with a UID in a config file or sqlite database. The UID is then used to differentiate the hosts. This would allow the hostname to be renamed at will within the uid config file/db while retaining the UID making it unnecessary to change the database names directly in MySQL.

Another suggestion that I have which runs parallel to these concepts is being able to link easyapache configs between servers. Some interface that allows you to setup the relationship like DNS clustering. So that any modification of Apache/PHP is then duplicated on any linked hosts. This maybe a separate idea and suggestion of its own, but it coincides with the whole Load Balanced cPanel Servers.

Another idea that has come to me before is having a LAMP stack only edition. Quite often when balancing cPanel servers, we do not balance mail. A LAMP stack only edition would eliminate the need for any client/mailbox features which could then be turned off and disabled. There is often no need to have dovecot listening on ports when they will never be utilized. Sure we'll still need mail sending capabilities so mailer related scripting can occur, but there wouldn't be a need for most of the mail functions in the regular cPanel version.

These are just my thoughts. I would be very happy to see more features down the road in cPanel that plain nicely with load balanced setups. We see more and more need for this in the hosting industry when working with clients that grow beyond the scope of a single server solution.

Leave a Comment
Attach a file