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.

Use a separate Server for MySQL in clustering with cPanel/WHM Server

Discussion in 'Database Discussions' started by chrisnagios, Oct 12, 2014.

  1. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hello,


    I currently have some dedicated servers for shared hosting clients,
    and most of them are hosting 500+ accounts, but my issue in all
    servers, is the Database overload...


    Is there any way to have completely disabled the MySQL in a cPanel/WHM Server
    and configure it to use another standalone server that has just MySQL installed,
    but still work automated, like for dbs and users creation etc ???


    Thanks for any suggestions!
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
  3. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    dalem, thanks a lot for pointing this out !

    some questions though:

    does the remote mysql server have to be also cPanel/WHM server or it can be just a clean linux with mysql ?

    also, this link above does not show how to migrate existing users/dbs, any info on this ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    cPanel is not required on the remote MySQL server. You must manually import your existing databases/users into the remote MySQL server. The "mysqldump" utility is a good tool for backing up and importing databases.

    Thank you.
     
  5. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Can I use the "system_backup.tar" to get the full DB restored on the MySQL server ???

    Also, will this work only with MySQL server or it can also work with MariaDB on the other end ???


    Thanks !!!
     
  6. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Finally, I decided that, maybe the best way to get this running, would be to setup a new clean server,
    make it using remote MySQL and then, transfer / copy all accounts from the old server to the new,
    so that when accounts get restored / recreated, they automatically get relocated the MySQL into the
    remote server...

    Please, let me know if this is possible and accurate or if restores would still be using the local DB ???

    Finally, on the new server, will I be able to have disabled in service manager the local mysql service or even completely disabled,
    or cPanel still uses the local db for internal things, like information schema for quotas and user settings, exim stats etc ???


    Thanks on advance for your response and help with this !
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You will still need to backup and restore the databases manually to the remote MySQL server, as that's not a transfer process facilitated by the cPanel software. The "mysqldump" utility will allow you to backup the databases, and the "mysql" utility will allow you to restore them on the destination server. You can disable MySQL on the cPanel server, but remember to transfer the existing databases created during the cPanel installation to the remote MySQL server.

    Thank you.
     
  8. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    what about maria db ???


    can the remote server be maria db ?

    - - - Updated - - -

    also, it is not clear if the remote server does require manual maintainance for backups or not

    will cpanel backups work with remote mysql or this does not work ???

    based on your earlier post, it seems that restoration would not work either ???????
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    The remote MySQL feature is designed to allow you to remotely manage the MySQL server. You should implement manual backup methods on that server. MariaDB is not yet supported (it's scheduled for version 11.48), but you can follow it's progress here:

    MariaDB support | cPanel Feature Requests

    Thank you.
     
  10. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    so with remote mysql, both backups and restores will not work ???

    - - - Updated - - -

    so for example, if an account gets hacked or broken by user error (common),
    if we click restore, the db will not be restored ?

    the nightly backups will not include the per account DB ???
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Options such as backups/restores should work as they normally would after you have setup the remote MySQL server. So for instance, if you restore a database through the cPanel UI, that database is restored on the remote MySQL server. The account backups and transfers will consider the remote MySQL server as "local" and backup the databases the same way they are locally. Feel free to test this and let us know if it's not functioning as expected.

    Thank you.
     
  12. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    is it possible to define a preinstallation file for remote mysql server, so even cPanel core tables are initially popullated remotely before install and to even completely skip mysql installation during setup ???


    thanks !
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  14. chrisnagios

    chrisnagios Member

    Joined:
    Feb 4, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    i've posted a feature request for this, its in moderation,
    can you plz get it approved and get involved to help me
    shape/rewrite it properly if needed ?

    also, plz post here the url so others can vote for it,
    it would be very cool to have this option !!!
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  16. double_t

    double_t Member

    Joined:
    Dec 2, 2007
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    If using remote server, apart that there are no backups, I guess that quota won't be supported also, right ?
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    No, disk space usage is calculated for databases on remote MySQL servers as long as you configured the remote MySQL server through WHM.

    Thank you.
     
Loading...

Share This Page