Skip to content

Instantly share code, notes, and snippets.

@maxfarseer
Forked from pauloremoli/create_user_postgres.md
Created February 26, 2025 16:18
Show Gist options
  • Save maxfarseer/6e9317a9d0d00bf31c7944961726e047 to your computer and use it in GitHub Desktop.
Save maxfarseer/6e9317a9d0d00bf31c7944961726e047 to your computer and use it in GitHub Desktop.
Create postgresql user Mac OS X

Create postgresql user Mac OS X

After installing the postgres app: http://postgresapp.com/

It will create a database user with the current username, to create another user for example 'postgres':

$ createuser postgres -s

Open psql with the created user using -U

$ psql postgres -U postgres

Change the password

$ ALTER USER postgres WITH PASSWORD 'my_password';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment