## Create User ``` create user john createdb; ``` or ``` create user john; alter user john createdb; ``` create with password ``` create user bobbins; alter user bobbins createdb; alter user bobbins password 'snuffle'; ``` # schema privileges ``` CREATE DATABASE EXAMPLE_DB; CREATE USER EXAMPLE_USER WITH ENCRYPTED PASSWORD 'Sup3rS3cret'; GRANT ALL PRIVILEGES ON DATABASE EXAMPLE_DB TO EXAMPLE_USER; \c EXAMPLE_DB postgres # You are now connected to database "EXAMPLE_DB" as user "postgres". GRANT ALL ON SCHEMA public TO EXAMPLE_USER; ``` ## Grant For Tables ``` GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO userName; ```