Re: starting postmaster W2K service
От | Frank Seesink |
---|---|
Тема | Re: starting postmaster W2K service |
Дата | |
Msg-id | bnkp9c$rah$1@sea.gmane.org обсуждение исходный текст |
Ответ на | Re: starting postmaster W2K service (Jason Tishler <jason@tishler.net>) |
Список | pgsql-cygwin |
... >>But the server does start when I open the Postgres program (Start -> >>Programs -> PostgreSQL -> Utilities -> Start PostgreSQL Server), and I >>can create Databases. But when I try to connect remotely to the >>Database using PgAdmin it gives an error message saying "Error >>connecting to the server. Is the server running on host ....". >> >>what does this mean? What do you suggest I must do? > > Sorry, but I have never used PgAdmin before. > > Jason Akhona, In short, the error message you are seeing is very much like what you would get if you tried using 'psql' from the Cygwin command line, such as ____________________________________________________________ [Connecting from psql to PostgreSQL via internal sockets] $ psql template1 psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? [Connecting from psql to PostgreSQL via TCP/IP ports] $ psql -h localhost template1 psql: could not connect to server: Connection refused Is the server running on host localhost and accepting TCP/IP connections on port 5432? ____________________________________________________________ The error message indicates that pgAdmin does not "see" your PostgreSQL server sitting on TCP port 5432 (assuming defaults). As noted with psql's error messages above, the question asked is pretty straightforward. In short, "I can't see PostgreSQL. Are you sure it's running?" As pgAdmin connects via TCP/IP and NOT via internal sockets, it's important that you have your PostgreSQL configured to listen via TCP/IP (which, by default, it is not). Specificically, look at /usr/share/postgresql/data/pg_hba.conf /usr/share/postgresql/data/postgresql.conf (again, assuming you have followed the README and used default directories). These files are self-explanatory with excellent comments. Just read them and make the appropriate adjustments to make sure PostgreSQL is listening via TCP/IP. Then pgAdmin should work fine. NOTE: For basic TCP/IP connectivity, only one line needs to be changed in each file. But I think it's in your best interest to understand what those files are doing for you. Be aware that having PostgreSQL listening via TCP/IP (one line in postgresql.conf) "opens up" your database to possible attack from the Net, so it's important to understand how to allow ONLY those users and/or IP addresses that should have access (set in pg_hba.conf). My test setup is set to only allow access from the localhost/loopback address, 127.0.0.1. Your situation may require something different. By the way, what version of pgAdmin are you using? The latest version as I write this is pgAdmin III v1.0.0, which I have installed and running. If you are running either an older beta of pgAdmin III or some version of pgAdmin II, be sure to look into this release. Details here: http://pgadmin.postgresql.org/pgadmin3/ P.S. Jason, when it comes to pgAdmin, I suspect you already know it's a free, open-source GUI front-end/client for PostgreSQL. Just note that it requires a TCP/IP hook into PostgreSQL. It does not support connection via sockets. So odds are the most common problem will be users not configuring PostgreSQL for TCP/IP.
В списке pgsql-cygwin по дате отправления: