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

Perl DBI connection fails after site was migrated

Our site was migrated on 3/31/20 and then all the scripts with mysql connections through Perl DBI failed. I reviewed similar topics and made suggested code changes, but nothing works. The key part of the code is below:

 

#!/usr/bin/perlml

use cPanelUserConfig;
use DBI;


#— For Go Daddy
my $database = “XXXXXX”;
my $host = "localhost";
my $port="3306";
my $userid = “YYYYYY”;
my $password = “ZZZZZZ”;
my $dsn = "dbi:mysql:$database:$host:$port";
#-- For Go Daddy


my $dbh = DBI->connect($dsn, $userid, $password, {AutoCommit => 0, RaiseError => 1})
or die "Could not connect :" . DBI->errstr;);

print "Content-type: text/html\n\n";
print "connected<br>";

 

By fooling around with placing printing lines I isolated the failure point to be the DBI->connect line. Any ideas on what is going on here? So far GoDaddy Support has not been able to help.

0 REPLIES 0