Recent versions of cPanel allow administrators the option of hosting a MySQL server on a separate box, which can help decrease resource usage from high-activity MySQL databases. Setting up the remote database server is easy:
- Log into WHM => Setup Remote MySQL Server.
- Input your remote server information. Note that this part of the setup is only required for the initial configuration, and any connection information will not be persistant.
- Click “Setup”.
This will configure cPanel and its applications (like phpMyAdmin and Horde) to use the remote database server. The connection to the remote MySQL server is made as a client connection whenever cPanel needs to add or manage a database. This is configured by the /root/.my.cnf file. One thing to remember with remote MySQL connections is that website applications should now use the new MySQL server’s hostname or IP rather than ‘localhost’, as they would if MySQL were running locally.
Regarding performance, it is usually recommended that remote MySQL be configured between servers on a LAN or within the same network to minimize data transfer time. While offloading MySQL may decrease the resource usage of a server, doing so across a slow network connection may cause noticeable latency in server operations.