http://qs321.pair.com?node_id=1053501


in reply to Using DB->connect for mysql db without password

Having databases without passwords is a bad idea, but if you really must do it the following code works for me.

my $database = 'test'; my $dbh = DBI->connect("DBI:mysql:$database",undef,undef,{ RaiseError +=> 1 });