sudo -u postgres createuser myapp_user

Category: Self-Hosting

sudo -u postgres createuser myapp_user

Create a new PostgreSQL user for an application

Creates a new database user. Best practice: give each app its own database user with access only to its own database.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.