Perl DBI and remote host connections

Bill Campbell linux-sxs
Wed Nov 10 13:08:39 PST 2004


On Wed, Nov 10, 2004, David Bandel wrote:
>Folks,
>
>I have done a lot of local web <--> local db work without a problem
>using Perl DBI.  However, this time, the db is remote.  So I went
>through the motions of putting in the necessary dbi parameters:
>
>$dbh = DBI???>connect("dbi:Sybase:database=$database;host=$host;port=$port",
>$username, $passwd);

Your post had some funny characters that may just be typical
Microshaft formatting.

>I have all the variables properly defined like so:
>my $host=192.168.7.59;
>my $port=1433;
>
>Using tcpdump, I get no outgoing connection attempts to the remote
>server.  My || die 'message' $! ; tells me no db connection (duh).  Of
>course not, there's not even an arp who-has looking for the remote
>host.
>
>What have I missed?  Don't believe I need to include all the
>networking modules, but I may be wrong.

Firewall blocking?  Can you telnet to port 1433 on the remote system?

Bill
--
INTERNET:  bill at Celestial.COM   Bill Campbell; Celestial Software LLC
UUCP:              camco!bill   PO Box 820; 6641 E. Mercer Way
FAX:           (206) 232-9186   Mercer Island, WA 98040-0820; (206) 236-1676
http://www.celestial.com/

"I do not feel obliged to believe that the same God who has endowed us
with sense, reason, and intellect has intended us to forego their use."
                                -- Galileo Galilei


More information about the Linux-users mailing list