Create PostgreSQL Role and Database
Creating PostgreSQL Role and Database
The createuser
command allows you to create new roles from the command line. Only superusers and roles with CREATEROLE
privilege can create new roles.
In the following example, we’ll create a new role named kylo
, a database named kylodb
and grant privileges on the database to the role.
Connect to the database:
Create the USER by issuing the following command:
Create Database:
Grant Permissions to the database
Last updated