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:
Best Answer
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
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 inpg_env.bat
, usually located hereDefault location of the data directory:
Where
<version>
is9.1
or9.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 oninitdb
. Maybe a problem with missing privileges?Here is a closely related question with a solution.