Re: mysql_connect does not connect
| From: | Jason Wong | Date: | Fri, 17 Sep 2004 19:05:29 +0000 |
| Subject: | Re: mysql_connect does not connect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197010@lists.php.net to get a copy of this message | ||
On Saturday 18 September 2004 02:30, Jason Davidson wrote:
> Hey, the reason it doesnt come in to play for you in linux, is becuase
> mysql by default will connect through a unix socket, and not over
> tcpip. The unix socket is a connection thru the filesystem and not the
> network. Also, in linux, there is a virtual device for lopback, and the
> firewall i dont beleive has any effect on the loopback device. In
> windows however, depending on what version, mysql will connect using
> tcp/ip, unless told otherwise, in this case, Sam supplied localhost to
> his connect function, which tells mysql explicitly to use the network
> over a named pipe.
Further food for thought. How you originally phrased the GRANT command in
mysql will (potentially) affect your ability to connect. For example
grant all on database.* to user@localhost identified by 'passwd';
is different to
grant all on database.* to user@127.0.0.1 identified by 'passwd';
and require that you use different connection parameters (at least under
Linux).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
It is through symbols that man consciously or unconsciously lives, works
and has his being.
-- Thomas Carlyle
*/