in reply to Re^2: MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)
in thread MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)
But I think I've found the solution. The format of the file is OK with a newline, the problem is the invocation of the connect method: if you specify an empty string for the password, it has precedence over the one specified in the config. You need to specify undef for the password to get it replaced by the configuration value.
my @dsns = ( $dsn, '', # username is read from file undef, # password is read from file!! {RaiseError => 1, PrintError => 1} );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)
by bliako (Abbot) on Nov 06, 2023 at 22:11 UTC | |
|
Re^4: MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)
by bliako (Abbot) on Nov 06, 2023 at 22:13 UTC |