The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Migrating from a Full cPanel Server to a cPanelWeb + cPanel MySQL server

Discussion in 'Database Discussions' started by Neutrall, Sep 9, 2014.

  1. Neutrall

    Neutrall Member
    PartnerNOC

    Joined:
    Jul 22, 2014
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi,
    I’m currently testing an environment where we will have a separate server for all MySQL database and about 15 regular cPanel server connecting to it.

    For this setup, I have a few questions! :confused:

    First off, cPanel has common database (modsec, roundcube, whmxfer, etc.) Will this cause a problem if I have one MySQL server for multiple cPanel Web servers?

    Second, on a dedicated MySQL server, if my load average is climbing up, is there a way I can find which site is causing the problem?

    Finally, during the transition, I would ask my client to points there site to “mysql.myciename.com” instead of localhost. Obviously, the mysql.myciename.com will point at the new MySQL/cPanel server… but in all my other servers that the database are not currently transferred on the new MtySQL server, I’ve tried addind a line in the /etc/hosts file to point “mysql.myciename.com to 127.0.0.1”

    EX :
    Code:
    127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4 mysql.myciename.com
    I’ve notice that doing so, the sites can no longer get connected to the database server?
    Any help or pointers will be appreciated!

    (We are planning to have a dedicated MySQL Server, dedicated SmarterMail server connected with multiple cPanel servers :rolleyes:)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    1. This is discussed on the following thread:

    Linking multiple servers to single MySQL server

    2. You would troubleshoot the load the same way you would normally troubleshoot it. Commands such as "mysqladmin processlist" are helpful for determining the source of the MySQL usage. This thread might also be helpful:

    Troubleshooting High Loads On Linux Systems

    3. Typically, when following the instructions on the Setup a Remote MySQL Server document, users can continue using "localhost" in their script configuration files due to the nature of how the remote MySQL server is configured. Is that not the case on your servers?

    Thank you.
     
  3. Neutrall

    Neutrall Member
    PartnerNOC

    Joined:
    Jul 22, 2014
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Thank you for your reply Michael,

    I'm a bit disappointed that currently we can't (or is not supported) to one MySQL server for multiple cPanel servers. Since cPanel offer such a great support in time of needs, we will only stick with the supported solutions!

    I'm made a quick search in the Features request section and didn't find this feature. If you can confirm that it's no in the feature section, I will gladly add it!

    Finally, for the third point (which is no longer important at the moment) the site with localhost where still pointing on the local server. I've tested this by closing the MySQL service on the local server and all the site with "localhost" could no longer connect to MySQL, but the sites with the new host could.

    When turning back on the MySQL service on the local server and closing the remote MySQL server service, I've got the opposite result. (I heard this is a normal behavior since other service will use the localhost name... )
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I do not see an open feature request for multi-server MySQL clustering with native support for duplicate cPanel-related databases. Please feel free to submit that request to our feature request system:

    Submit A Feature Request

    Thank you.
     
Loading...

Share This Page