From 7b1fb0d24810ff5a9052793ddb47adff3c595182 Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Wed, 15 Nov 2023 13:58:26 +0100 Subject: [PATCH] Document that connect needs undef password to read it from a config In DBD::mysql, empty password works, too, but it means you can't pass an empty password, although it's a valid one. --- lib/DBD/MariaDB.pod | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/DBD/MariaDB.pod b/lib/DBD/MariaDB.pod index c5cf8d04..38334a06 100644 --- a/lib/DBD/MariaDB.pod +++ b/lib/DBD/MariaDB.pod @@ -217,6 +217,10 @@ config file, as in my $dsn = 'DBI:MariaDB:test;mariadb_read_default_file=/home/joe/my.cnf'; my $dbh = DBI->connect($dsn, $user, $password); +If the config file specifies the password, you need to use C in +C, not just an empty string, to have it replaced by the config value. +All other attributes replace even the empty string. + The option I can be used to specify the default group in the config file: Usually this is the C group, but see the following example: