my $dsn = "DBI:mysql:host=somehost:database=test"; my $dbh = DBI->connect($dsn, $user_name, $password) || warn "Cannot connect to server #!\n";