I just created a free account on freehostia and am trying to use DBI to connect to a database I created. I received an email after I created the database giving me my database connection information, which was:
username: timpuz_datab
password: ****
database name: timpuz_datab
database host: mysql3.freehostia.com
database port: 3306
I run the following code in a perl script (this isn't the whole code, just the DBI connection stuff) in my www directory and I get the 500 server error:
use DBI;
my $database = "timpuz_datab";
my $host = "mysql3.freehostia.com";
my $port = "3306";
my $db = "DBI:mysql:$database;host=$host;port=$port";
my $username = "timpuz_datab";
my $password = "****";
# CONNECT TO THE DATABASE
my $dbh = DBI->connect( $db, $username, $password) or die $DBI::errstr;
I feel like I've tried everything but I can't get it to work. Can anyone help?
Thanks!
|