Create user in PostgreSQL
Method 1
To create user, become user “postgres” with
1 |
su - postgres |
now run
1 |
createuser USER_NAME |
Method 2
You can run following commands in psql prompt
1 2 3 4 |
CREATE USER USER_NAME_HERE WITH PASSWORD 'PASSWORD_HERE'; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO USER_NAME_HERE; GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO USER_NAME_HERE; GRANT USAGE ON SCHEMA public TO USER_NAME_HERE; |
https://www.postgresql.org/docs/8.0/static/sql-createuser.html