Separate MySQL server

welo

Well-Known Member
Nov 11, 2002
71
0
156
I'm preparing to launch some services later this year that will require a separate data server. Offhand I'm not seeing anything in the WHM allowing me to setup website accounts so they will automatically run databases from another server (along with phpMyAdmin etc.). Has anyone done this? If so, how did you manage it?
 

bofla

Member
Sep 1, 2002
20
0
151
I never done that, but I know your pains:) Only way is to contact Cpanel directly and ask them to help you change the code:D
I think setting up different MySQL server, would require custom made script that is integraded into WHM. Only Cpanel can do that for you. But, question is, will they:confused:
 

welo

Well-Known Member
Nov 11, 2002
71
0
156
Hmm. Ok. Setting up a MySQL server and adding it to the cluster is pretty easy. Whether cPanel is able to interface with it is definitely another matter. It seems someone should have accounted for this already though. For instance, what if you run a service specializing in forum hosting? In that case it would just flat make sense to be sending all the data from a separate box on the same cluster and distributing the weight.
 

Brio

Member
Jul 9, 2003
19
0
151
Originally posted by welo
Whether cPanel is able to interface with it is definitely another matter.
There is an option in WHM.

With the WHM X skin it's under "MySQL" - "Setup Remote MySQL server"
 

welo

Well-Known Member
Nov 11, 2002
71
0
156
Okay, so how exactly does the remote server need to be configured? Will cPanel need to be installed on that box too? I'm wondering how stuff like updates and phpMyAdmin are handled. I suppose it would makes sense that phpMyAdmin would be updated on the localhost box rather than the remote one. Whether cPanel updates MySQL over there might be another matter, unless it uses localhost RPMs and feeds them.
 

bamasbest

Well-Known Member
Jan 10, 2004
531
0
166
According to the WHM docs:

You can change the MySQL server from the local server ("localhost") to point to a remote server. This allows MySQL functions to be performed by another computer.

To set up a remote MySQL server:

1.

Click on the Setup Remote MySQL server link in the MySQL menu.
2.

Enter the name of the remote server in the Remote Mysql Host field and its password in the Remote Mysql Host's Root Password field.

Note: Do not enter the root password for the remote MySQL server in the Remote Mysql Host's Root Password field.
3.

Click on the Setup button.
 

welo

Well-Known Member
Nov 11, 2002
71
0
156
Thanks. I already read the WHM docs. What I want to know is how exactly is the remote SQL server configured and updated?
 

Brio

Member
Jul 9, 2003
19
0
151
I would imagine that the MySQL install will be looked after by you - it won't be able to remotely deal with your machine. All it will do is connect to the remote MySQL database instead.

You'll have to keep MySQL up to date, but PHPMyAdmin should still be on the cPanel box I think.
 

lgwong

Member
Oct 11, 2003
8
0
151
2 Web Server Sharing 1 MySQL Server?

Can 2 cpanel web server share one MySQL server? I saw that cpanel will copy the horde email database ot the MySQL server, what happen then if 2 web server share one MySQL server?
 

wptechno

Active Member
Jun 10, 2004
42
0
156
bamasbest said:
According to the WHM docs:

You can change the MySQL server from the local server ("localhost") to point to a remote server. This allows MySQL functions to be performed by another computer.

To set up a remote MySQL server:

1.

Click on the Setup Remote MySQL server link in the MySQL menu.
2.

Enter the name of the remote server in the Remote Mysql Host field and its password in the Remote Mysql Host's Root Password field.

Note: Do not enter the root password for the remote MySQL server in the Remote Mysql Host's Root Password field.
3.

Click on the Setup button.

If i do this, will my localhost setting be lost. I mean, I've got like hundreds of scripts using localhost in their config files and just recently needed remote access. Is this going to screw all that up to where i have to update each config file?

Thanks,
Ben
 

abubin

Well-Known Member
Dec 7, 2004
401
3
168
i would assume this to be yes because I don't think cpanel is smart enough to go change every script's setting to point to the new mysql server. One easy what that I can think off hand is to manually link localhost to the new server ip instead of 127.0.0.1 but not sure if that's possible.

Anyway, please post back here your setup progress because this information seems interesting and important.
 

Shazan

Active Member
Aug 31, 2002
27
5
153
I am interested on this matter too, as I have two single CPanel servers and I'd them to share one remote MySQL server. The way it works is not clear enough for me.
 

protocol

Well-Known Member
PartnerNOC
Apr 13, 2004
90
0
156
I think your could forward the local mysql port to the remote server which would stop all the scripts breaking.

I asked Cpanel about remote MySQL server some time ago. Here are the questions and answers:

> 1. Can you migrate a localhost setup?
While this is possible it is not supported. You would need to manually move all the databases and re setup all of the users scripts

> >2. I was considering forwarding localhost mysql port onto the remote host in addition so customers sites don't break.
This is also not supported nor recommended

> >3. Do you need cpanel on the remote server?
No you do not

> >4. Can 2 or more web servers use the same mysql server?
Absolutly

> >5. If so what happens with eximstats databases etc?
It would need to be moved also

> >6. Are the databases still backed up with the cpbackup script?
No they will not be

> >7. Whats the best procedure for moving the databases over?
Unfortunatly we do not support this

> >8. Anything else to know?
While what you are requesting to do is possible, I recommend having someone that has a lot of experience with mySQL do this.

Hope this helps
 

DigitalN

Well-Known Member
Sep 23, 2004
419
1
168
"If i do this, will my localhost setting be lost. I mean, I've got like hundreds of scripts using localhost in their config files and just recently needed remote access. Is this going to screw all that up to where i have to update each config file?"

I patch php to change all 'localhost' requests to 127.0.0.1 instead and NAT 127.0.0.1 port 3306 to the external IP of the mysql server.
 

ha77ab

Registered
Dec 21, 2006
3
0
151
"If i do this, will my localhost setting be lost. I mean, I've got like hundreds of scripts using localhost in their config files and just recently needed remote access. Is this going to screw all that up to where i have to update each config file?"

I patch php to change all 'localhost' requests to 127.0.0.1 instead and NAT 127.0.0.1 port 3306 to the external IP of the mysql server.
how could you patch php to do that please?
 

big

Well-Known Member
Aug 12, 2001
224
0
316
Earth
"If i do this, will my localhost setting be lost. I mean, I've got like hundreds of scripts using localhost in their config files and just recently needed remote access. Is this going to screw all that up to where i have to update each config file?"

I patch php to change all 'localhost' requests to 127.0.0.1 instead and NAT 127.0.0.1 port 3306 to the external IP of the mysql server.
could you please advise?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I know this topic is kinda old but in case that someone is still interested, this is 100% wrong. This sort of wrong answers should be moderated and users that are not knowing what they are talking about should be warned.
Note the age of this thread (started in 2004). Naturally, answers provided 3 years ago may not be accurate today.

Additionally, the item you quoted is correct - you do not need cPanel/WHM to be running on a remote MySQL server for it to properly cluster with cPanel/WHM. It only needs to be running MySQL and Perl and the cPanel/WHM server must be able to SSH to the MySQL server.