Home Forums Database Mac OS – Creating a PostgreSQL Database Role (User)

Tagged: 

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #843
    Rad UsrRad Usr
    Keymaster

    How-to Create a new user for use with the PostgreSQL DB on Mac OS

    1. Open the terminal from:
      Applications\Utilities\Terminal
      — See help link open link below for assistance
      Mac OS How-to Open Terminal
    2. Type command below from the terminal
      createuser -P -d appname
      — In this command, you used createuser to create a role named appname. The -d flag gave the role the permission to create new databases.
    3. login to postgres with following command from terminal:
      psql postgres
    4. Your terminal will look like this below with postgres=#
    5. While you’re logged in to psql, type the following to check to see the list of users in database
      postgres=#\du;
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.