Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 17, 2022 03:18 pm GMT

How To Access PostgreSQL Globally in Windows

If you are getting the error below after installing PostgreSQL dont panic, just follow along with this tutorial and its gonna be solved.

Header image

This tutorial is simplified to help everyone to know how to add PostgreSQL to user or system variable(path) which can be accessed globally with minimum stress.

Lets begin!

Normally, you will have to navigate to your PostgreSQL bin directory to copy the path which takes a while. Instead, I will provide the path for you to make everything quick and easy.

Path to postgresql bin directory

C:\Program Files\PostgreSQL\14\bin

NB: Change \14\ to the version of Postgres you have installed

Step 1

Copy the path to your Postgres bin directory provided above.

Step 2

Press the windows start button and search for env then click open

Search

Step 3

Click on Environment Variables

env

Step 4

Double click on Path

Path

Step 5

Click on New

New Path

Step 6

Paste the [PostgreSQL bin](C:\Program Files\PostgreSQL\14\bin) path you copied. Then click ok recursively to close all windows

Paste path

Step 7

Close all instances of your terminal then reopen it.

NB: If you are using terminals in VS Code Editor, you will have to restart VS Code Editor for the changes to take effect

Postgres Accessed Globally

Step 8

You are done

And now you can log in to Postgres without using the default psql shell.

Hope this solves your issue about using Postgres globally.

Thank You


Original Link: https://dev.to/manu_tech/how-to-access-postgresql-globally-in-windows-37g9

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To