Steps to install Postgresql Database in windows:
1.
Download PostgreSQL software from below
link.
https://www.enterprisedb.com/download-postgresql-binaries
2.
Click on win x86-64, software will
download.
3.
Extract that software, extracted binaries
looks as below.
4.
Copy this software to other drive from
downloads.
5.
Create one directory as data to create
database.
6.
7.
Open a command prompt as administrator.
8.
Goto bin location of Postgresql software,
copy that location go to that location from command prompt.
D:\postgresql\pgsql\bin
9.
Goto data directory and copy that path,
execute like below
10.
Initdb.exe -> is tool to create the
database.
-D -> This option specifies the
directory where the database cluster should be stored.
-U -> Selects the user name of the superuser. This defaults to the name of the cluster owner.
Press enter, then it will create the
database.
11. Create
the service for postgresql database in windows.
Pg_ctl -> is too to initialize, start, stop, or control a PostgreSQL server
Register -> using for registering the service in windows
12. Verify
the service in services, Go to search box and run services.msc
13.
See the in services, postgresql
service is created, to start the database click on start button .
Postgresql database is running
now.
To connect the postgresql database
open command prompt and run as like below.
Psql -> PostgreSQL interactive terminal
-U -> Username with what
user would like to connect the database.
To check the status of database
To stop the database from
command prompt
To start the database from command
prompt.
To connect the database.
To Quite the database