Re: trouble connecting with psql to running server
Gavin M2301 <[email protected]> Tue, 7 May 2019 23:30:50 -0400
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <CAHiusVhq7sq=ZZ+hNjj2FkfnDCRxPhj4PNxec9K-NiZLe7u+Bw@mail.gmail.com> |
Hi thnx for that Andres. Typos may end up being the death of me. Will check tomorrow evening. Thnx! On Tue, May 7, 2019, 11:11 PM Andrés Rodríguez <[email protected]> wrote: > The port are wrong, you connect 5432, and maybe in postgresql.conf are > configured 5342, check number > > Regars > > El mar., 7 de mayo de 2019 10:04 p. m., Gavin M2301 < > [email protected]> escribió: > >> Hi all- >> >> I can't connect by psql like this: >> >> ./psql -h localhost -p 5432 -d template1. >> >> Here is some data: >> $ ./psql -h 127.0.0.1 -p 5342 -d template1 >> psql: error: could not connect to server: could not connect to server: >> Connection refused (0x0000274D/10061) >> Is the server running on host "127.0.0.1" and accepting >> TCP/IP connections on port 5342? >> $ ./postgres -d 3 -D C:/msys64/usr/local/pgsql/data -c >> config_file=/c:/msys64/usr/local/pgsql/data/postgresql.conf >> >> 2019-05-07 22:39:19.833 EDT [23160] LOG: starting PostgreSQL 12devel on >> x86_64-w64-mingw32, compiled by x86_64-w64-mingw32-gcc.exe (Rev2, Built by >> MSYS2 project) 8.3.0, 64-bit >> 2019-05-07 22:39:19.838 EDT [23160] LOG: listening on IPv6 address >> "::1", port 5432 >> 2019-05-07 22:39:19.838 EDT [23160] LOG: listening on IPv4 address >> "127.0.0.1", >> It (postmaster) is still going. No idea why I can't connect with psql >> client. >> >> Here is my pg_hba.conf: >> >> # IPv4 local connections: >> host all all 127.0.0.1/32 trust >> # IPv6 local connections: >> host all all ::1/128 trust >> # Allow replication connections from localhost, by a user with the >> # replication privilege. >> host replication all 127.0.0.1/32 trust >> host replication all ::1/128 trust >> >> Any ideas guys/gals? >> I normally don't get this stuck. There is something blocking ./psql from >> connecting to anything. >> I might want to mention I built it with mingw. I put the bin directory in >> path. I am using mingw msys2. I don't see a process when I do ps -ef | grep >> postgres but I can see where the server is running continually. I am using >> the version on GitHub. >> >> thanks for any ideas on what I can try. >> roboloki >> >>