How to install PostgreSQL and pgAdmin on windows 11

In this article, we will see how to install PostgreSQL and pgAdmin on windows 11 step by step.

Steps to install PostgreSQL and pgAdmin on Windows 11

1. Go to PostgreSQL Download Page

2. Click on Download.

3. Once download is completed, go to the download folder and double click on it.

How to install PostgreSQL 14 and pgadmin 4 on windows 11

4. Click on next.

5. Provide the installation directory and click on next.

6. Select the components to install and click on next.

7. Then provide path to store PostgreSQL data and click on next.

8. Provide the password for superuser i.e. postgres and click on next.

9. Default port is 5432. We are not changing it. Click on next.

10. Select locale setting from the drop down and click on next.

11. Review the installation summary and click on next.

12. If we want to launch stack builder then we have to keep checkbox. Otherwise uncheck it and click on finish.

13. Now click on windows button from your keyboard and search for psql to open psql shell to connect to PostgreSQL server on windows 11.

14. Now, we have to provide the hostname, database name, port number and password user postgres to connect to PostgreSQL server. Here I have not given anything except password. Remaining are defaults and press enter.

15. Now, run the following command to check PostgreSQL server installed version.

select version();

Now connect PostgreSQL server using pgadmin:

1. Windows button from your keyboard and search for pgadmin.

2. Provide password and expand servers from left pane. By default, localhost is added. If not added click on Add New Server.

How to start stop PostgreSQL Server on Windows 11

1. Windows+Run from your keyboard then type services.msc.

2. Scroll down postgresql service and right click on it to restart, start or stop PostgreSQL.

So, in this article we have seen how to download and install PostgreSQL latest version on Windows 11 operating system. Then, we have seen how to connect PostgreSQL using psql and pgadmin tool on Windows 11. Finally, we have seen how to stop, start and restart PostgreSQL server on Windows 11.