tweakservers

Well-Known Member
Mar 30, 2006
379
0
166
DWHS.net said:
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 second your suggestions. Perhaps a feature request to their bugzilla would be nice :D
 

aeroweb

Well-Known Member
Jun 4, 2004
67
0
156
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
 

SoftDux

Well-Known Member
May 27, 2006
1,024
5
168
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.....
 

SoftDux

Well-Known Member
May 27, 2006
1,024
5
168
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?
 

aeroweb

Well-Known Member
Jun 4, 2004
67
0
156
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 [email protected]:/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.
 

hergy80

Well-Known Member
Sep 4, 2004
64
1
156
SoftDux said:
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.
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.
 

Chaze

Registered
PartnerNOC
Oct 12, 2005
4
0
151
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.