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.

Remote sql servers

Discussion in 'Database Discussions' started by soja92, Jul 12, 2014.

  1. soja92

    soja92 Member

    Joined:
    Jul 12, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    If I were to set up a remote mysql server, and move all data from my local mysql server, would cpanel be able to use it just like before? Would all databases linked to user accounts still show up properly?

    Thanks
     
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    soja92,

    cPanel will list the databases present in the local server only. Why would you want to list
    the remote db's here ?
     
  3. soja92

    soja92 Member

    Joined:
    Jul 12, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I want to transition all current databases to an external server(on LAN) to compartmentalize the services. I have a lot of services that rely on SQL in addition to my website.
     
  4. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    soja92,

    you will have to modify your codes to establish connection to the remote server, instead of
    the localhost. You wont be able to see the db's in a remote server on your cPanel interface.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Actually, you can use the following option in Web Host Manager:

    "WHM Home » SQL Services » Setup Remote MySQL Server"

    It's documented here:

    Setup Remote MySQL Server

    Thank you.
     
  6. soja92

    soja92 Member

    Joined:
    Jul 12, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for the information. That is the feature I was going to use. I do however have a few questions.

    Does the mysql server need to have a WHM/cPanel license? seems a bit wasteful.

    Will there be any impact on how the databases work within cpanel? Assuming I copy over all users/data to the remote server.
     
  7. madsere

    madsere Well-Known Member

    Joined:
    Apr 7, 2004
    Messages:
    49
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    DataCenter Provider
    No you don't need a cpanel license on the database server if you just set up a plain Linux server with Mysql. Once it runs it ought to be quite transparent to the users.

    The documentation is not complete imo. It fails to explain how to practically implement it, particularly on a server that already have local mysql databases.

    As far as I understand it you start by installing a server with mysql, then follow the WHM documentation in order to allow the WHM server to communicate with the remote mysql server. The documentation mentions that you need to manually copy over the databases, but I think the details are not clear.

    - the documentation mentions databases needs to be copied over manually, but completely lacks details. I would presume by shutting down mysql on both servers and then copy over /var/lib/mysql ought to do the trick, but it would be nice to have that confirmed.

    - generally scripts such as wordpress or joomla use localhost as database host name. Presumably if the database is moved to another server someone will need to go through all the config files and change the database host names accordingly. Just changing the ip address for localhost in /etc/hosts would probably not be wise.

    - I think this would also be the case with tools such as phpmyadmin, also this is not addressed by the documentation.

    It would be nice if we could have these things clarified.
     
    #7 madsere, Jul 21, 2014
    Last edited: Jul 21, 2014
  8. soja92

    soja92 Member

    Joined:
    Jul 12, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    That sums up the information I am looking for. Thank you for the reply.

    Bump

    Does anyone have answers to these questions?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    1. No, cPanel is not required on the remote MySQL server. However, note that if you do choose to install cPanel/WHM on the remote server, then a license is required.

    2. You should not have to modify the configuration files for your scripts after you migrate your databases to the remote server. You should be able to continue using "localhost" after enabling of the remote MySQL server option.

    Thank you.
     
Loading...

Share This Page