Windows install PostgreSQL 13.3

table of Contents

One, download PostgreSQL 13.3

Two, PostgreSQL 13.3 installation

3. Start PostgreSQL service under Windows

Fourth, use the visualization tool pgAdmin to operate the PostgreSQL database

One, download PostgreSQL 13.3

Download link:

This article downloads Windows x86-64 version: 13.3

Two, PostgreSQL 13.3 installation

After downloading, click the postgresql-13.3-2-windows-x64.exe installation package to install;

1) Double-click to download the installation package and start the installation

2) The installation path can be modified

3) Select the installation components and tick all of them:

4) Set the database path

5) Set the password of the super user to root

6) Set the port number, you can just use the default

7) Click Next directly

8) Click Next

9) Remove the check and click Finish directly

3. Start PostgreSQL service under Windows

If the PostgreSQL service is not started after the successful installation of PostgreSQL and the computer is restarted, the PostgreSQL database cannot be connected using the visualization tool pgAdmin ;

After entering the directory C:\Program Files\PostgreSQL\13\bin\, execute the following command:

pg_ctl.exe start -D "C:\Program Files\PostgreSQL\13\data" -w

Screenshot of successful startup of PostgreSQL service under Windows:

Use the command line tool SQL Shell (psql) to operate the PostgreSQL database:

Connect to the database: Enter the password set when PostgreSQL was installed, and the following figure is displayed, that is, the connection to the database is successful

Fourth, use the visualization tool pgAdmin to operate the PostgreSQL database

1) In the PostgreSQL 13 start menu, click pgAdimin

2) Enter the configured password root

3) Log in for the first time, use super user postgres to log in

Screenshot of successful login:

3) Create a new login and connected user

Enter username and password

Set to log in

Screenshot after successful creation: the sonar user is created successfully

4) Create a new database

Enter the database name sonarqube, and select the user who can log in as sonar

The sonarqube database is created successfully, and the table is stored under the default public Schemas