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.

Separate MySQL server

Discussion in 'General Discussion' started by welo, Feb 24, 2004.

  1. welo

    welo Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  2. bofla

    bofla Member

    Joined:
    Sep 1, 2002
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    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:
     
  3. welo

    welo Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  4. Brio

    Brio Member

    Joined:
    Jul 9, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    There is an option in WHM.

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

    welo Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  6. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  7. welo

    welo Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Thanks. I already read the WHM docs. What I want to know is how exactly is the remote SQL server configured and updated?
     
  8. Brio

    Brio Member

    Joined:
    Jul 9, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  9. lgwong

    lgwong Member

    Joined:
    Oct 11, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  10. wptechno

    wptechno Active Member

    Joined:
    Jun 10, 2004
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6

    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
     
  11. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  12. wptechno

    wptechno Active Member

    Joined:
    Jun 10, 2004
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    I don't know for sure but I think you can keep localhost too, but I'm going to find out soon enough.
     
  13. Shazan

    Shazan Member

    Joined:
    Aug 31, 2002
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  14. protocol

    protocol Well-Known Member
    PartnerNOC

    Joined:
    Apr 13, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  15. dan.andrus

    dan.andrus Member

    Joined:
    Jun 30, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    has anyone found a solution to this?i am interested as well...
     
  16. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    "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.
     
  17. ha77ab

    ha77ab Registered

    Joined:
    Dec 21, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    how could you patch php to do that please?
     
  18. big

    big Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    could you please advise?
     
  19. Sergiu Tot

    Sergiu Tot Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cluj, Romania
    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.
     
  20. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page