#!/usr/bin/perlml use cPanelUserConfig; use 5.010; use strict; use warnings; use CGI::Carp qw/fatalsToBrowser/; print "Content-type: text/html\n\n"; #B1. Database name, table name, user name, and password #respectively. User name and password are case sensitive. my $dbase="***"; my $tablename="***"; my $username="***"; my $mysqlpassword="***"; #These two should not need modified unless connecting to MySQL on #a remote server or to a database platform other than MySQL. my $hostname="localhost"; #my $hostname = "localhost:3306"; #my $hostname = "p3plcpnl1204.prod.phx3.secureserver.net"; my $databaseserver="mysql"; use DBI; say "Perl MySQL Connect Demo"; # MySQL database configuration #my $DSN = "dbi:mysql:$dbase:$hostname"; #my $DSN = "DBI:mysql:$dbase"; #my $DSN = "DBI:mysql:database=$dbase;host=$hostname"; my $DSN = "DBI:mysql:database=$dbase;host=$hostname"; my $dbh = DBI->connect( $DSN, $username, $mysqlpassword ); my $dbh = ""; if ($dbh) { say "Connected to the MySQL database."; } else { say "Catastrophe! Connection failure with DSN '$DSN', pass '$mysqlpassword', user '$username': $DBI::errstr +"; } #### 500 Internal Server Error Please forward this error screen to cowlitzcountycemeterydistrict6.info's WebMaster. The request was not completed. The server met an unexpected condition. cowlitzcountycemeterydistrict6.info/cgi/test2.pl (port 80) #### Perl MySQL Connect Demo Catastrophe! Connection failure with DSN 'DBI:mysql:database=***;host=localhost', pass '***', user '***': + #### /usr/bin/perlml: relocation error: /home/b3mtw1376jad/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so: symbol mysql_options4, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference