MySQL: host name universal change.
Posted
by ctrlShiftBryan
on Stack Overflow
See other posts from Stack Overflow
or by ctrlShiftBryan
Published on 2010-02-24T23:45:45Z
Indexed on
2010/06/18
14:03 UTC
Read the original article
Hit count: 178
connection
|myphp
I am making some updates to a php site which I did not design. I have a local copy of the site. At the top of each page there are settings for the host name for the db connection.
Is there someway I can setup a pointer to the remote address. The address is 'mysqlhost' for example and I want that to point to 'mysql.myhost.com'. I tried creating a HOST record for mysqlhost pointing to the IP address it resolves to but that doesn't work.
If I put 'mysql.myhost.com' in the connection it works. If I put that IP address it doesn't so that is probably why the HOST record idea doesn't work.
Other than creating a local copy of the DB is there a quick way so that I don't have to modify each file in my dev environment and then again when I redeploy?
© Stack Overflow or respective owner