Jay,

You can set things in "/etc/my.cnf" and 
"/etc/php.ini" that will affect everything, 
but if you just want one script you should 
RTFM: 

:-)

mysql_connect
(PHP3 , PHP4 )

mysql_connect -- Open a connection to a MySQL Server

Description

int mysql_connect ([string hostname [:port] [:/path/to/socket] [,
string username [, string password]]])

Returns: A positive MySQL link identifier on success, or an error
message on failure.

mysql_connect() establishes a connection to a MySQL server. All of the
arguments are optional, and if they're missing, defaults are assumed
('localhost', user name of the user that owns the server process, empty
password).

The hostname string can also include a port number. eg. "hostname:port"
or a path to a socket eg. ":/path/to/socket" for the localhost.

Note: Support for ":port" was added in PHP 3.0B4.

Support for ":/path/to/socket" was added in PHP 3.0.10.

You can suppress the error message on failure by prepending '@' to the
function name.

In case a second call is made to mysql_connect() with the same
arguments, no new link will be established, but instead, the link
identifier of the already opened link will be returned.

The link to the server will be closed as soon as the execution of the
script ends, unless it's closed earlier by explicitly calling
mysql_close().

Example 1. MySQL connect example

<?php
    $link = mysql_connect ("kraemer", "marliesle", "secret")
        or die ("Could not connect");
    print ("Connected successfully");
    mysql_close ($link);
?>

See also mysql_pconnect(), and mysql_close().
==========

Good luck,

Troy

>>> austad at marketwatch.com 08/22/02 03:55PM >>>
Anyone know how to make mysql only listen on 127.0.0.1?

Also, does anyone know how to make a PHP script use mysql over a Unix
socket
connection?

Jay
_______________________________________________
Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul,
Minnesota
http://www.mn-linux.org 
tclug-list at mn-linux.org 
https://mailman.mn-linux.org/mailman/listinfo/tclug-list