Unable to connect to postgress with libPQ

conn2 = LibPQ.Connection("dbname=postgres")

tells me that I can’t find

 Unix domain socket "/tmp/.s.PGSQL.5432"?

I’m using Ubuntu 20.04.3 LTS on an x86 Xeon machine. I’ve had the same issue with Crystal. Postgress is installed, but I need to figure out how to troubleshoot it.

Do any postgres tools work? That would let you know whether it is a julia problem or a more general sysadmin problem.

For instance, can you list anything about your database with psql PostgreSQL: Documentation: 13: psql

Also, this was at the top of a google search and it seems like a good starting point. postgresql - Socket File "/var/pgsql_socket/.s.PGSQL.5432" Missing In Mountain Lion (OS X Server) - Stack Overflow

psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "brettkknoss" does not exist

not sure how it created brettkknoss, I tried purging and reinstalling postgress. I think I need to change the user.

psql -h localhost

requires a password, I have no idea what this password would be.

It does not seem like this is Julia related. I would suggest looking up some intro tutorials on setting up postgres. I found the following two after a quick online search:

Consider also using a simpler database, like sqlite. It is not nearly as feature rich as postgres, but it is many orders of magnitude simpler to set up.

thanks, is there a good community resource on Postgres?

I remember enjoying reading their official documentation (one of the pages above links to it), but it is a bit of a slog. If you are making a single-user desktop app, or a single-server few-users webapp you probably do not need something as heavy though. It would certainly be much easier to start with GitHub - JuliaDatabases/SQLite.jl: A Julia interface to the SQLite library

OK, I think I can get a lot from SQLite. I was wanting to learn basic crud stuff, and maybe how to tie into statistics