I’m able to connect to the database in the terminal with psql but postbird keeps saying connection refused. I’m running Pop!_os, using a system76 laptop. I’m not sure if that matters, I’m somewhat new to linux and it’s been difficult in the past to tell if ubuntu help pages apply to me.
For linux, the instructions just say sudo snap install postbird
popos doesn’t come with snap so I downloaded the deb file and installed that from the terminal.
windows install says to login with username postgres, I tried with no database entered and as it is shown below. I tried postgres as password, I’m a bit lost.
following as i get the same issue, i am able to run postgre from terminal but not from postbird
So I guess I can either try a different GUI or a different OS? I’m right at the beginning of a course to learn what PostgreSQL is and how to use it, my course asks me to install the programs so I can learn how the programs work. It’s difficult to troubleshoot from this position.
Finally found a way!
-
First of all make sure you got just one postgresql version installed (purge it and reinstall it if you have to, I have installed version 15).
-
Start the server with:
~ sudo pg_ctlcluster 15 main start
-
Go to terminal window and enter the server with:
~ sudo su - postgres
~ psql -
Create database with encoding:
~CREATE DATABASE {databaseName} WITH ENCODING ‘UTF8’;
-
Enter the database (make sure to use only lower case letters!):
~ \c {databaseName}
-
Create user and password being in that database:
~CREATE USER {userName} WITH PASSWORD ‘{yourPassword}’
-
Now do not close that window ( haven`t tried to run it after closing connection with database but I think that would not work)
-
Open POSTBIRD and enter all the details of what you have created and VOILA!
Hope that works for you!!
You might have another problem if you don`t have privileges set to superuser or similar.
To change the priviliges:
- Open psql:
~ sudo su - posgres
~ psql - Change your user to be superuser:
~ ALTER USER {userName} WITH SUPERUSER; - You can check if it worked with:
~ \du
Thanks for the help, maybe some day I’ll get back into programming and try this out. I’m not actively trying to change careers after not being able to figure this out.