S
skieros
my $dbh = DBI->connect('DBI:mysql:;host=mysql3.freehostia.com',
'nikkou6', '********', {RaiseError=>1});
or
my $dbh = DBI->connect('DBI:mysql:' 'root', '********',
{RaiseError=>1});
Is the above likely to work?
I made it liek these so for init.pl to have a knowledge of wether it
runs on localhost or on freehostia.com which is my remote hosting
company.
For some reason it aint working...but i don't see the error.
Matt said:
I would expect that when connecting to MySQL without specifying a
database you will connect by default to the "mysql" database (if the
lack of a default database isn't the error; never tried), and I doubt
very highly that your host would allow you in there. You might try
adding a die statement if you don't get a handle so you know what went
wrong and so your code doesn't continue on when it shouldn't:
my $dbh = DBI->connect() or die $DBI::errstr;
Matt
'nikkou6', '********', {RaiseError=>1});
or
my $dbh = DBI->connect('DBI:mysql:' 'root', '********',
{RaiseError=>1});
Is the above likely to work?
I made it liek these so for init.pl to have a knowledge of wether it
runs on localhost or on freehostia.com which is my remote hosting
company.
For some reason it aint working...but i don't see the error.
Matt said:
I would expect that when connecting to MySQL without specifying a
database you will connect by default to the "mysql" database (if the
lack of a default database isn't the error; never tried), and I doubt
very highly that your host would allow you in there. You might try
adding a die statement if you don't get a handle so you know what went
wrong and so your code doesn't continue on when it shouldn't:
my $dbh = DBI->connect() or die $DBI::errstr;
Matt