http://www.perlmonks.org?node_id=1053492


in reply to Re^2: Using DB->connect for mysql db without password
in thread Using DB->connect for mysql db without password

Have you tried using undef or '' for the username and/or password?

Replies are listed 'Best First'.
Re^4: Using DB->connect for mysql db without password
by angeloulivieri (Novice) on Sep 11, 2013 at 13:31 UTC
    Yes, I tried. It didn't worked....
      Using '' (or undef) works for me
      #!perl use strict; use DBI; my $dbh = DBI->connect('DBI:mysql:test:localhost','','') or die $DBI::errstr; print $dbh->tables;
      poj