cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
New

Perl program not working with DBI module

Hi,

 

  I am struggling a lot to figure these out. I have developed a database using perl CGi scripts which was working well in my personal computer. I tried to host in godaddy.com but perl program with DBI module is not working. I am connecting my database like this b ut not working

 

#!/usr/bin/perl
use CGI qw(:standard);
use cPanelUserConfig;
print "Content-type: text/html \n\n";
use DBI;
$db=DBI->connect('DBI:mysql: DBname','username','password');

 

Please let me know how to connect my mysql database in perl script

 

Thanks

1 REPLY 1
Community Manager
Community Manager

Re: Perl program not working with DBI module

HI @zfared. Welcome to GoDaddy Community! I'm not a developer, but I don't see a hostname for the database in your connection string. I'm guessing you have already added the database on the hosting plan. If so, the hostname should just be localhost. Also, make sure that you have added the specific database user and then also added that user to the database with the right permissions. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.