---
title: "How To Create a PostgreSQL User & Adding them to the Database"
description: "In this guide, we will show you how to create a PostgreSQL User, and then add them to a database. **You must [create a PostgreSQL database](https://truehost.co.ke/support/knowledge-base/how-to-create-a-postgresql-database-in-the-cpanel/) before attempting this guide.** #### **How to Create A PostgreSQL User** Step 1: Login to cPanel.…"
url: "https://truehost.com/support/knowledge-base/how-to-create-a-postgresql-user-adding-them-to-the-database/"
updated: "2024-06-07"
---

# How To Create a PostgreSQL User & Adding them to the Database

In this guide, we will show you how to create a PostgreSQL User, and then add them to a database.

**You must [create a PostgreSQL database](https://truehost.co.ke/support/knowledge-base/how-to-create-a-postgresql-database-in-the-cpanel/) before attempting this guide.**

#### **How to Create A PostgreSQL User**

Step 1: Login to cPanel.

Step 2: Click the **PostgreSQL Databases** button in the *Databases* section.

![](https://truehost.co.ke/support/wp-content/uploads/2020/12/PostgreSQL-Database-1-1024x150.png)

Step 3: In the *Add New User* section, enter a username, then your password in the available fields. Be sure to use a ***strong password***.

![](https://truehost.co.ke/support/wp-content/uploads/2020/12/PostgreSQLUsers-1024x407.png)

Step 4: Click the **Create User** button.

Up to that point, we are done with creating the PostreSQL Database user.

### **How to Add a User to a Database**

Step 1: Login to cPanel.

Step 2: Click the **PostgreSQL Database** button in the *Databases* section.

![](https://truehost.co.ke/support/wp-content/uploads/2020/12/PostgreSQL-Database-2-1024x150.png)

Step 3: In the *Add User To Database* section, select the **User** you want to add from the drop-down menu.

![](https://truehost.co.ke/support/wp-content/uploads/2020/12/PostgreAddUser.png)

Step 4: Choose the database you want to add the user to, from the *Database* section. Click the **Submit** button.

That is all you need to know on how to create a PostgreSQL user, and add them to a PostgreSQL database.
