Cpanel and remote MySQL back and forth config issues

wjdv

Registered
Aug 16, 2011
3
0
51
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
 

wjdv

Registered
Aug 16, 2011
3
0
51
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?
 

wjdv

Registered
Aug 16, 2011
3
0
51
Right, thanks. I didnt know if cpanel might act as some sort of proxy for the remote mysql situation. Appreciate your answers.