Setting Up A Remote MySQL Server in your cPanel server

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:

  1. Log into WHM => Setup Remote MySQL Server.
  2. 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.
  3. 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu