I downloaded PostgreSQL from their site - http://www.postgresql.org/download/windows
However, I can't create a database from pgAdmin and get a message:
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?
Do I have to create a windows service? How is it called? Do I have to install it separately?
EDITED
Let me explain myself. I am trying to run the service. I tried running postgres.exe from the command line but still it does not run.
What could run the database?
EDITED
The problem was with my installation file. I downloaded it again - and it worked well!
This question is related to
windows
database
postgresql
I have the solution to this problem enters (Start -> Run -> services.msc) are looking for the postgresql service once you localizas le das Properties---> login and you disable the account you have and what you leave as the local system account , save and restart the programs pgadmin3 and ready should operate.
Greeting from Colombia
Your server running on port 5432 but in the properties, the port is set to 5433.
You must go to pgAdmin, click on database version, ex: PostgresSQL 10 and edit properties.
A new window appears and you need to change the port to 5432 [this is default port].
If you don't want or can't install postgres again, you can install the server from the binary zip like this post explains it.
you to restart services PostgreSQL from task manager click ctrl+alt+delete then chose services the postgresql-[version] chose the option to run automatically then start and apply ->ok
You only need to do
pg_ctl register
then execute servcies.msc
enable the "PostgresSQL" and set to auto
then, your postgresql will run like the "server".
I'm not on windows, but I think you can use the pgAdmin you just installed to configure a server connection and start the server.
The solution was simply to comment the lines "work_mem=256MB" and "maintenance_work_mem=$3GB" in the file postgresql.conf and try to start the postgresql service. (start -> run -> services.msc) and look for the postgresql-[version] service then right click and start.
Your server might not be running. This can have 2 issus IMO:
I had the problem that the permissions were not set on the postgres folders and so the service was not able to start. I have no idea why that happend but giving proper permissions on the root postges folder and subfolders did the trick. If I recall it correctly, postgres is also installed as a service so you should find it in the Service List
To start the server, you have a startcommand in your Startmenu. Somewhere at Start -> PostgreSQL -> Start Service/Server/... (haven't used it on Windows for a long time but it should be there).
Please Download from this
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
install above downloaded file
then
The solution was simply to delete %appdata%\pgAdmin (win key + r then type %appdata% got folder pgAdmin) which was created by an earlier version. On systems other than Windows, there probably is a pgAdmin directory in your user directory. Of course, all session settings etc. are gone after deleting this.
(start -> run -> services.msc) and look for the postgresql-[version] service then right click and enable it
Checking the port may work.
On pgAdmin page at the top, go to Properties and check the port if it is same with the one provided during the setup. If not click the edit button on the top right and change the port.
Use Services
This will start PostgresSQL servers as normal.
You might get a more descriptive error message if you tried to start the service from command line using this command:
"C:\Program Files\PostgreSQL\9.5\bin\pg_ctl.exe" start -N "postgresql-x64-9.5"
-D "C:\Program Files\PostgreSQL\9.5\data" -w
The log file would be at C:\Program Files\PostgreSQL\9.5\data\pg_log
.
Note that paths and service name might be different depending on your installation.
Source: Stackoverflow.com