I wanted to connect my R studio with my PostgreSQL.
it gave me this error message:
Error in postgresqlNewConnection(drv, …) :
RPosgreSQL error: could not connect postgres@localhost:5432 on dbname “postgres”: SCRAM authentication requires libpq version 10 or above
I tried running the following on R script but I got the error:
install.packages("RPostgreSQL")
require("RPostgreSQL")
con <- dbConnect(dbDriver("PostgreSQL"),
dbname = "postgres",
host = "localhost",
port = 5432,
user = "db_user",
password = "db_password")
I also have a question on where do you find the “db_user” and “db_password”. I tried connecting my R with PostgreSQL by following tutorial online but most of them have to set up control panel (windows). im using M1 chip macOS, hence I’m not sure where to check for the user and the password.
I have also tried searching for similar questions here, but I haven’t found one that asks about how to fix this error for the R language. (most of them are for python, and other languages)