- postgres config files are in /etc/postgresql/9.6/main
- edit postgresql.conf to listen on port 5432 (listen_addresses = '*')
- verify with netstat -nlt that you're listening on port 5432 to addresses other than localhost.
- edit pg_hba.conf to allow the user to connect (host all all 192.168.1.0/24 md5)
- in the past I've had issues because I've created the database without a password, so I've needed to do an "alter user pi password '<password>'"
- verify by dbGetQuery(con,"select current_time") in R (RPostgreSQL), or dbGetQuery(con,"select current_time") from Python (psycopg2)
- this post probably says it all better.
Friday, October 12, 2018
configuring posgresql server on raspberry pi
I always burn time re-figuring out how to do this.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment