my $dbh = DBI->connect( $DSN, $username, $mysqlpassword ) or die "$DBI::errstr";
In addition to kcott's advice about string interpolation and DSN construction, I would also not necessarily trust fatalsToBrowser to present the die message to you. While debugging, just print it instead. That way you'll know better what's going on. I assume throughout this that you have no access to the web server error log.
my $dbh = DBI->connect( $DSN, $username, $mysqlpassword ); if ($dbh) { say "Connected to the MySQL database."; } else { say "Catastrophe! Connection failure with DSN '$DSN': $DBI::errstr +"; }
Try that. You could also decide to print $username and $mysqlpassword on failure. See the Basic Debugging Checklist for more valuable hints.
🦛
In reply to Re: 500 internal server error when connecting to mysql database
by hippo
in thread 500 internal server error when connecting to mysql database
by mcfarnell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |