Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my $password = 'password';
    
    my $dbh = DBI->connect($dsn,$username,$password);
    
  2. or download this
    ...
    my $port = 12345; # whatever is should be
    my $dsn = "DBI:mysql:database=$db;host=$server;port=$port;
    ...
    mysql_ssl_client_cert=/var/lib/ssl/client-cert.pem; 
    mysql_ssl_ca_file=/var/lib/ssl/cacert.pem"; # Your paths may vary...
    ...