DEV Community

Punitha
Punitha

Posted on

SQL Setup and Installation

Step 1: Download PostgreSQL

  • Visit the PostgreSQL official website

  • Download the latest PostgreSQL version compatible with your operating system

  • Run the installer

Step 2: Install PostgreSQL

  • Launch the installer

  • Click Next

  • Select the installation directory

  • Keep default components selected:

  • PostgreSQL Server

  • pgAdmin 4

  • Command Line Tools

  • Click Next

Step 3: Set Password

  • Enter a password for the postgres user

  • Confirm the password

  • Click Next

Step 4: Configure Port Number

  • Default Port: 5432

  • Click Next

Step 5: Complete Installation

  • Review settings

  • Click Install

  • Wait for installation to finish

  • Click Finish

Step 6: Open pgAdmin 4

  • Search for pgAdmin 4 in Windows

  • Open pgAdmin

  • Enter the password if prompted

Step 7: Connect to PostgreSQL Server

  • Expand Servers

  • Select PostgreSQL Server

  • Enter the password created during installation

Step 8: Create a New Database

  • Right-click Databases

  • Select Create -> Database

  • Enter database name

  • Click Save

Step 9: Open Query Tool

  • Select the database

  • Click Tools -> Query Tool

Step 10: Test SQL Query

SELECT 'Hello SQL';
Enter fullscreen mode Exit fullscreen mode
  • Click Execute

Top comments (0)