DEV Community

Tao Liu
Tao Liu

Posted on • Edited on

create pgsql user

Alt Text

For example, to create the PostgreSQL username jdoe the command is:

sudo -u postgres createuser -s jdoe
To set a password for this user, log in to the PostgreSQL command line client:

sudo -u postgres psql
At the PostgreSQL prompt, enter the following command to set the password:

\password [username]
For example, to set the password for jdoe the command is:

\password jdoe
Enter and confirm the password. Then exit the PostgreSQL client:

\q

source https://www.ionos.com/digitalguide/server/know-how/use-postgresql-with-ruby-on-rails-on-ubuntu/

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay