DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

PostgreSQL: Create New User And Database

  • submit to reddit
        Create a new user in PostgreSQL, then add a new database as that owner.  

$ sudo -u postgres createuser -D -A -P mynewuser
$ sudo -u postgres createdb -O mynewuser mydatabase 

<a href="">How to Setup a Database Server with PostgreSQL</a>