|
Posted by Erwin Moller on 04/26/06 11:53
janvdberg@gmail.com wrote:
> Hi,
>
> i have an old webserver where users let their script connect to
> localhost for mysql queries. I have a new mysql server where I want to
> put all the user databases. So Im looking for a way to make PHP
> interpretet 'localhost' as a network socket and connect to
> 'mysql.host.com'.
> Is there an easy way to do this; this would really help me migrate the
> user databases.
>
> Regards,
>
> Jan
Hi Jan,
I don't think it is smart to try to change the meaning of localhost.
You might end up with all kinds of extra trouble.
Why don't you just change all the connectstrings in the applications to
reflect the new location of the databases?
Just make sure the connectstring uses the right IP-num, and also make sure
the connection uses TCP/IP instead of local sockets.
Also, as far as I know, localhost-like connectstrings uses pipes to connect
to the DB, and since you moved the db to another machine, your pipes will
be broken, unless you know how to fix such issues (I don't).
Just go TCP/IP, it is designed for for your new setup.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|