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.

Cpanel and remote MySQL back and forth config issues

Discussion in 'General Discussion' started by wjdv, Aug 16, 2011.

  1. wjdv

    wjdv Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have read mixed information on this forum about how this should actually work.

    Hopefully someone can give me the right answer :)

    We started with server1 and at some point a previous admin decided it would be a good idea to use a remote server just for mySql. So we ended up with server2 hosting MySQL and server1 hosting web/mail/dns/etc.

    I now want to move MySQL back to server1 from server2. What I notice is:

    All configs for clients use IP of server2 as hostname.
    I am surprised because some forum threads here say you can keep the config as localhost and this will be routed via cpanel to the new remote IP. This doesn't seem to be true?

    When I migrate all MySQL dbs back from server2 to server1, and I disable remote MySQL in cpanel, I assume I will need to manually change all config to hostname=localhost. Is there any more efficient way to do this?

    Thanks in advance
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,465
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    To change each users websites config file pointing to the remote database, to localhost? I'm not sure there is short of editing them manually.
     
  3. wjdv

    wjdv Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Infopro and as regards the hostname= remoteIP - was this correct or could previous admin have left it as localhost and cpanel would have routed this somehow to remoteIP itself?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,465
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Well, localhost is just that.
     
  5. wjdv

    wjdv Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Right, thanks. I didnt know if cpanel might act as some sort of proxy for the remote mysql situation. Appreciate your answers.
     
Loading...

Share This Page