PostgreSQL Configuration
- Make new Database and remember the Database name for future use.
Table 1. PostgreSQL Configuration Command sudo -u postgres createdb <Database name> Eg: sudo -u postgres createdb aexdb - Transfer ownership of the database to this user
Table 2. Database Details Command sudo -u postgres psql -c "ALTER DATABASE <Database name> OWNER TO <Username of DB>;" Eg: sudo -u postgres psql -c "ALTER DATABASE aexdb OWNER TO aexpguser;" - Grant all permissions (Safety step)
Table 3. PostgreSQL Configuration (Cont.) Command sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE <Database name> TO <Username of DB>;" Eg: sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE aexdb TO aexpguser;" - Confirm
| Command | sudo -u postgres psql -l | grep <Database name> |
| Eg: | sudo -u postgres psql -l | grep aexdb |