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.

Redundant remote mysql servers

Discussion in 'General Discussion' started by DWHS.net, Oct 4, 2006.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Wow how great would it be to have a cpanel use two mysql servers and if one doesn't work then it rolls over to the next.

    I actually don't think it would be that hard for them to set up. :D

    Sorry just popped in my head.
     
  2. tweakservers

    tweakservers Well-Known Member

    Joined:
    Mar 30, 2006
    Messages:
    379
    Likes Received:
    0
    Trophy Points:
    16
    I second your suggestions. Perhaps a feature request to their bugzilla would be nice :D
     
  3. aeroweb

    aeroweb Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    I third the suggestion. But why stop there? Why not redundant mail servers as well?

    I know that this may not be practical for some smaller hosts, but that about some of us that already run 4 or 5 Cpanel servers? If Cpanel could support a clustered solution with a hardware load balancer then that would put it far ahead of other control panels currently available. It shouldn’t be too hard to implement some kind of asynchronous system as an additional Cpanel option.

    Something similar to http://forums.cpanel.net/showthread.php?t=34925 that also supports automatic no hassle Cpanel updates would be awesome :). I would love to experiment myself with such a setup but I just don't have the time. Waiting for Cpanel to do the hard work for me :) .

    Having a synchronous rather than an asynchronous solution for the stateful data would be an even bigger plus. That way, not only can we have redundancy but a true load balanced cluster that can share server loads.

    But at this point I think I am just a hopeful dreamer. Right now I would be happy if Cpanel would just fix my wysiwyg pro editor :D
     
  4. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    I'm looking for a solution to be able to synchronize the MySQL server on my office PC with the one on my cPanel server. Any ideas / suggestions?

    What you guys suggested would be great, but I think it would be better if this could be done on the VPS / dedicated side of your cPanel server, that way the OS takes the load, and not your hosting account.....
     
  5. aeroweb

    aeroweb Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    #5 aeroweb, Oct 6, 2006
    Last edited: Oct 6, 2006
  6. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    I'm not 100% sure if this will work. I don't quite like editing scripts on the server which are controller by cPanel's backup. I'm sure the my.cf file get's overwriiten with MySQL upgrades. I also don't quite want to take the whole DB down for this purpose.

    Let me explain my scenario.

    Quite often we work with the Fantastico scripts which uses MySQL

    So, instead of working on the sites on the live server, I'd prefer to work on them on my own PC, and then just have the DB's (and the directories) automatically sunc each time I connect to the net. Quite often I would travel and work on my laptop and then upload the scripts & DB files to the server.

    What alternatives do I have for such a scenario?
     
  7. aeroweb

    aeroweb Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    You could do this several different ways:

    - You probably dont have Cpanel installed on your laptop, but if you did you could manually do an account copy in WHM

    - You could use rsync; something like:
    rsync -avz -e ssh /var/lib/mysql user@IP:/var/lib/

    - SCP would also work similar to above

    - Do a mysql dump and then copy/import the dump file into the database. Something like the following:
    mysqldump dbname --add-drop-table -u user -p passwd | mysql -h remote_host_ IP -u user -p passwd dbname

    If you wanted all databases you could make a small script using the techniques above and modify it to include: mysqldump --all-databases

    Hope this helps.
     
  8. hergy80

    hergy80 Well-Known Member

    Joined:
    Sep 4, 2004
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    I'm pretty sure that cpanel doesn't overwrite the my.cnf file (at least I hope not) since that's where you have to make changes to optimize your database for whatever type of traffic/machine you have.
     
  9. Chaze

    Chaze Registered
    PartnerNOC

    Joined:
    Oct 12, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I think it would be easy for cpanel.

    just have a fail over option in cpanel's mysql section.

    Have cpanel copy all database stuff to both servers

    If the main stops working then have the second start working.

    I guess there would have to be a sync option as well so the broken mysql can catch up with the one used while the server was repaired.
     
Loading...

Share This Page