It is currently Fri Mar 29, 2024 7:04 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: DBI connection
PostPosted: Wed Aug 08, 2007 3:29 pm 
Newbie
Newbie

Joined: Wed Aug 08, 2007 3:24 pm
Posts: 2
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!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 14, 2007 10:56 am 
Newbie
Newbie

Joined: Wed Aug 08, 2007 3:24 pm
Posts: 2
One shameless bump.

It seems my code is right but it just isn't working. I opened a ticket and they say they are working on it, but I'm not so sure.

Is there anyone out there who is using DBI here and is connecting just fine? Could you please post your code so I can give it a try?

Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011