debugsqlMinor
PostgreSQL not working, pgAdmin always says server not listening
Viewed 0 times
postgresqlpgadminalwaysworkingsayslisteningservernot
Problem
I am brand new at this so maybe it's a simple mistake. I was given a very large .sql file with the instructions to make a copy of a database locally on a computer. I was told "to be able to install the database you need to install postgres. Use pgAdmin to create a table called reports with UTF8 encoding".
pgAdmin III always tells me the server is not listening. Postgres is not showing up anywhere in the services in administrative tools. Whenever I install or uninstall Postgres 9.1 or 9.2 I get errors. When I uninstall I get "Error stopping service postgresql-x64-9.2", "Error deleting service postgresql-x64-9.2", "The data directory (C:\Program Files\PostgreSQL\9.2\data) and service user account (NT AUTHORITY\NetworkService) has not been removed".
I was advised to login to the postgres account, however none appears at the login screen. If I try to create an account named postgres I get a bogus error message (see picture)
I was advised to type this into the command line:
When installing I get this error:
pgAdmin III always tells me the server is not listening. Postgres is not showing up anywhere in the services in administrative tools. Whenever I install or uninstall Postgres 9.1 or 9.2 I get errors. When I uninstall I get "Error stopping service postgresql-x64-9.2", "Error deleting service postgresql-x64-9.2", "The data directory (C:\Program Files\PostgreSQL\9.2\data) and service user account (NT AUTHORITY\NetworkService) has not been removed".
I was advised to login to the postgres account, however none appears at the login screen. If I try to create an account named postgres I get a bogus error message (see picture)
I was advised to type this into the command line:
When installing I get this error:
Solution
Since you installed multiple versions of PostgreSQL, there is a good chance your cluster is running on a different port than 5432. Additional clusters automatically use the next free port unless instructed otherwise. Like 5433, 5434 etc.
Check your setting in
Default location of the data directory:
Where `
Here is a closely related question with a solution.
Check your setting in
postgresql.conf to find out and connect to the proper port. postgresql.conf is usually installed in your data directory, which in turn is defined in pg_env.bat, usually located hereC:\Program Files\PostgreSQL\\pg_env.batDefault location of the data directory:
C:\Program Files\PostgreSQL\\data\postgresql.confWhere `
is 9.1 or 9.2 in your case.
Base directory varies according to your version of Windows.
Obviously initdb fails to create a database cluster. Read the chapter in the manual to get a grip on initdb`. Maybe a problem with missing privileges?Here is a closely related question with a solution.
Code Snippets
C:\Program Files\PostgreSQL\<version>\pg_env.batC:\Program Files\PostgreSQL\<version>\data\postgresql.confContext
StackExchange Database Administrators Q#27228, answer score: 4
Revisions (0)
No revisions yet.