On 18 Mar 2004 at 11:15, Ricardo Lopes wrote: > What is the problem in changig localhost in houndreds of scripts, ou can do > that with a script or a good text editor that has the function Replace in > Files... can do the trick.
Changing scripts is not a main factor here (but it's not as simple as it may seem - consider some encoded php applications, cgi's or some not informed users who will overwrite changed files with their local copies). I just wanted to know if it's possible to do this without touching localhost. > > I dont think that editing the host file to make localhost point to the other > machine is a good practice. :) I agree. But it doesn't work anyway ;) PB > > ----- Original Message ----- > From: "Operator" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 18, 2004 8:57 AM > Subject: [PHP-DB] MySQL - separating web and database servers > > > > Hi everyone, > > > > I need to put my database server on the another machine - how can I > > configure system(Debian Linux)/php/mysql etc. to make it work without > > changing all 'localhost' in a hundreds of customer's scripts? > > > > The problem is, when localhost is specified as a host the connection is > made > > using unix socket, not TCP (is it possible to change this?). I tried to > > export the socket from database server via NFS, but with no success: > > > > (...) > > munmap(0x2e1f2000, 4096) = 0 > > rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0 > > socket(PF_UNIX, SOCK_STREAM, 0) = 3 > > fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) > > connect(3, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, > > 110) > > = -1 ECONNREFUSED (Connection refused) > > shutdown(3, 2 /* send and receive */) = 0 > > close(3) = 0 > > (...) > > > > Any ideas? > > > > Regards > > Piotr Babula > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php