Connect to postgreSQL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Connect to postgreSQL

R help mailing list-2
I am using RStudio Version1.0.143 on a Windows 7 machine. R version 3.4.0

I am trying to connect to a postgreSQL database with the following
command, but I receive an error message that says my password is
incorrect. Since I saved my password in a file, I think I remember it.

I searched for a solution online, but cannot figure out what to do. If I
have to change my password, please provide explicit instructions.

>  con <- DBI::dbConnect(RPostgreSQL::PostgreSQL(),

+ password = "sql1",

+ port = 5432,

+ dbname = "pg_dump-sfpg-2017-08-18"

+ )

Error in postgresqlNewConnection(drv, ...) :

RS-DBI driver: (could not connect Ira@localhost:5432 on dbname
"pg_dump-sfpg-2017-08-18": FATAL:password authentication failed for user
"Ira"

)

Thanks.
Ira


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Connect to postgreSQL

JohnDee
On Sat, 26 Aug 2017 18:35:31 -0700
Ira Sharenow via R-help <[hidden email]> wrote:

Can you access the postgres database through psql or some other route?
Also, do you require a password to access the database from these
alternatives?

JWDougherty

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Connect to postgreSQL

R help mailing list-2
I went to the Start menu and opened a psql shell. I entered some
information, but when I entered the password, it said authentication failed.

Server localhost, the default

Database the file previously mentioned pg_dump-sfpg-2017-08-18

Port 5432

Username Ira

Password sql1--  Fatal error

When this happened within R, I found the following.

https://stackoverflow.com/questions/18587710/change-reset-postgresql-user-password-on-windows-7

However, I was unable to follow the instructions.

Note also that I have never used psql. Someone sent me a file which I
intended to analyze using R. I do know how to write SQL queries, having
used SQL Server.


On 8/26/2017 9:47 PM, John wrote:
> On Sat, 26 Aug 2017 18:35:31 -0700
> Ira Sharenow via R-help <[hidden email]> wrote:
>
> Can you access the postgres database through psql or some other route?
> Also, do you require a password to access the database from these
> alternatives?
>
> JWDougherty
>


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.