---
title: "Discussion on \"Step-by-Step Guide: Create PostgreSQL Database, User, and Grant Privileges on Ubuntu\" | Hashnode"
description: "Discussion on \"Step-by-Step Guide: Create PostgreSQL Database, User, and Grant Privileges on Ubuntu\". Here is the correct way to create a PostgreSQL database, user, and give full permissions on Ubuntu.\n1️⃣ Login to PostgreSQL\nsudo -i -u postgres\npsql\n\n\n2️⃣ Create Database\nCREATE DATABASE \"the-ai-shift"
url: "https://hashnode.com/posts/step-by-step-guide-create-postgresql-database-user-and-grant-privileges-on-ubuntu/69b2adbc31303b597ced5c61"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Step-by-Step Guide: Create PostgreSQL Database, User, and Grant Privileges on Ubuntu](https://mandeepsingh.hashnode.dev/step-by-step-guide-create-postgresql-database-user-and-grant-privileges-on-ubuntu?utm_source=hashnode&utm_medium=feed)

Here is the correct way to create a PostgreSQL database, user, and give full permissions on Ubuntu. 1️⃣ Login to PostgreSQL sudo -i -u postgres psql 2️⃣ Create Database CREATE DATABASE "the-ai-shift

Mar 12 · 2 min read · mandeepsingh.hashnode.dev  
Read the article

-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#psql](https://hashnode.com/tag/psql)
-   [#databases](https://hashnode.com/tag/databases)

## Written by

[Mandeep Singh](https://hashnode.com/@mandeepsingh)

@mandeepsingh · Machhiwara Sahib, India

  
[View profile](https://hashnode.com/@mandeepsingh)

Code Repeat Repeat

I am Mandeep Singh, a full-stack developer. I created this Blog to bestow my coding experience and love to write on JavaScript, Next.js, Laravel and little bit Unity Game development.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
