On Tue, Mar 20, 2001 at 03:12:39PM -0600, Jeff Jones wrote:
> I am using mysqld_multi to have several different mysql servers start. I have
> finally gotten it to work with php when I connect to a non-standard socket,
> such as /tmp/mysql.sock2. Does anyone know how to connect to a database with
> perl through that socket? I have tried the following with no luck:
>
> my($port) = '/tmp/mysql.sock2';
> my($mysql) = "DBI:mysql:webhost:localhost:$port";
> $dbh = DBI->connect($mysql, 'user', 'pass');
>
> But it will not establish the connection. Has anyone done this before or is
> it even possible with the Perl DBI?
>
I use this:
my $dbh = DBI->connect("dbi:mysql:database=$dbname:mysql_socket=/tmp/mysql-3.23.sock",
$account, $passwd);
Regards,
Fred.
--
Fred van Engen XO Communications B.V.
email: [EMAIL PROTECTED] Televisieweg 2
tel: +31 36 5462400 1322 AC Almere
fax: +31 36 5462424 The Netherlands
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php