How to Install PostgreSQL 11.6/12.1 in windows 10 x86/64 bit with pgAdmin 3/4
The PostgreSQL installers created by EnterpriseDB are designed to make it quick and simple to install PostgreSQL as a GUI on your computer. The installer provides: Install PostgreSQL 10 in windows.
But some time PostgreSQL installer open and close in window, this time we stuck to install PostgreSQL 11/12/13/14/15 in window machine.
So in this article you can learn how to install PostgreSQL in windows 10 with pgAdmin with binary files.
How to Install PostgreSQL 11/12 in windows 10:
- Download postgresql from https://www.enterprisedb.com/download-postgresql-binaries;
- Unzip it;
- Copy psql folder from and paste this to your specific directory.
- Enter into the ‘bin’ directory of postgresql
- Copy the bin directory path.
- Open System Properties, click on Enviroment Variable, then click on Path and then Edit.
- Click on New and past the ‘bin’ directory path of postgresql
- Click on ok, then click on new to set PGDATA Enviroment Variable
- Copy the data path where you want to save the data in my case, i created a data folder inside \pgsql folder
- click on ok-ok and close System Properties windows.
- Open CMD.
- Init the database:
initdb.exe –username=postgres –auth=trust
initdb.exe -D YOUR_DATA_PATH –username=postgres –auth=trust
- Start the database: pg_ctl start
- You get a message on CMD >> done >> server started
- Log into the database: psql –username=postgres
- Create a password for your user: ALTER USER postgres WITH PASSWORD ‘postgres’;
If you still facing any issue to install PostgreSQL, ask in comment. Will provide the solution/help.