Help for this page

Select Code to Download


  1. or download this
    my $dsn = 'DBI:mysql:database=testdb;mysql_read_default_file=creds.txt
    +';
    my @dsns = (
    ...
    );
    my $dbh = eval { DBI->connect(@dsns) };
    die $@ if $@;
    
  2. or download this
    [client]
    user=testuser
    password=apass
    
  3. or download this
    my $dsn = 'DBI:MariaDB:database=testdb;mariadb_read_default_file=creds
    +.txt';
    ...