Yes, I do connect to the DB server over IP - in short this is what I do
within MAIN of all my scripts (and $db is what is used anyplace a DB
connection is needed)

######################################################################
# Database Setup
# ---------
#
my $dbpassfile = '/websites/web_files/dbadmin.pass';
my ($db_username,$db_password,$db_location,$db_name,$db);
open (DBPASSFILE, "$dbpassfile") or die "Couldn't open $dbpassfile: $!\n";
while (<DBPASSFILE>) {
     ($db_username,$db_password,$db_location,$db_name) = split;
     }
my $database = "DBI:mysql:database=$db_name:host=$db_location";
$db = DBI->connect($database,$db_username,$db_password) or die "Cannot
Connect: " . $db->errstr();
close DBPASSFILE;

I use a text file to store the username,password,table name and IP to add
just a little more security.
I have check to make sure that open files on the linux machine wasn't a
issue (and it wasn't) when opening up that file each time.

As far as the connection_timeout, I don't have anything in my.cnf but if I
do a mysqladmin variables it shows me its set to 5.

I think I'm going back to the drawing board :)

Thanks
-Chris


>>
>> This DOES seem to indicate you are connecting using TCP/IP. Are
>> you? If so,
>> a whole new sleuth of options appears.
>>
>> > I'm leaning towards either Redhat 8, or Apache 2 or the combination of
>> > the two of them - I just can't figure out what else to try or what to
>> > look for.
>>
>> Try connecting over the domain socket; or / and add something
>> like this to
>> the [mysql] section of my.cnf,
>>
>>     set-variable = connect_timeout=4
>>
>> Just to see whether it is a timing problem.
>>
>> - Mark
>>



---------------------------------------------------------------------
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 <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to