I have an R shiny server which also hosts a PostgreSQL Database. However, I have trouble connecting R with Postgres.
Here is my R script:
library("dplyr")
library("RPostgreSQL")
con <- dbConnect(PostgreSQL(), dbname = "___", host="localhost", port="___", user="___", password="___")
With  Rscript "skript.R" I get this error:
Error in postgresqlNewConnection(drv, ...) :
  RS-DBI driver: (could not connect _____@localhost:___ on dbname "versuch1": FATAL:  Ident authentication failed for user "_____"
)
Calls: dbConnect -> dbConnect -> postgresqlNewConnection -> .Call
Execution halted
What am I doing wrong. Any hints?
