I have installed Postgres in my machine, and I'm trying to connect to it using Perl.
$database = "heatmap";
$user = "postgres";
$password = "<password>";
#connect to Postgres database
my $db = DBI->connect(
"DBI:Pg:database=$db;",
$user,
$password
) or die "Can't Connect to database: $DBI::errstr\n";
However, I'm getting the following error:
DBI connect('database=;','postgres',...) failed: FATAL: password authentication failed for user "souzamor" at C:/Users/souzamor/workspace/Parser/Parser.pl line 13.
Can't Connect to database: FATAL: password authentication failed for user "souzamor"
souzamor is my Windows username. However, I'm trying to connect as postgres. I went ahead and created an user called souzamor in Postgres, but I got:
DBI connect('database=;','souzamor',...) failed: FATAL: database "user='souzamor'" does not exist at C:/Users/souzamor/workspace/Parser/Parser.pl line 13.
Can't Connect to database: FATAL: database "user='souzamor'" does not exist
I'm totally new with Postgres. Any ideas? Thanks