Re: Speed of MySQL connections - Socket vs. Non-Socket
| From: | Alexander Skwar | Date: | Tue, 17 Apr 2001 22:43:35 +0000 |
| Subject: | Re: Speed of MySQL connections - Socket vs. Non-Socket | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49074@lists.php.net to get a copy of this message | ||
So sprach Don Read am Tue, Apr 17, 2001 at 05:13:14PM -0500:
> define('DBHOST', 'localhost');
> // define('DBHOST', 'myhost.domain.com');
>
> define('QRY', 'select * from foo');
>
> $db=mysql_connect(DBHOST, DBUSER, DBPASS);
> if ( $db )
> testquery(QRY);
>
>
> ?>
>
> set the define(s) to something sensible for your setup.
>
> 'myhost.domain.com' would be your network hostname for the box, either in
> /etc/hosts or from your DNS server.
>
> test the numbers using the 'localhost' (the AF_UNIX socket).
> comment/uncoment the 'myhost' line & re-test (AF_INET connect).
the first define, defines a connect using a AF_UNIX socket? Are you sure?
According to the manual, I'd have thought, that I'd need to do:
define('DBHOST', 'localhost:/tmp/mysql.sock' );
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 0 hours 33 minutes