Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Tuesday, August 3rd at 3pm PST / 6pm EST. Learn more
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Perl program not working with DBI module



  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 but perl program with DBI module is not working. I am connecting my database like this b ut not working


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



Community Manager

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 | Remember to choose a solution and give likes.