Please consult the perl documentation located at http://www.perl.com/pub/q/documentation.
The following example connect’s to database “your_database_name” with username “your_mysql_user” and password “your_password”. You will need to substitute these values for your actual database, username, and password you setup in the Web Control Panel.
$mysql_server = "localhost"; $mysql_db = "your_database_name"; $mysql_user = "your_mysql_user"; $mysql_password = "your_password"; $dbh = DBI->connect("DBI:mysql:database=$mysql_db;host=$mysql_server", $mysql_user, $mysql_password, {'RaiseError' => 1});