7. PostgreSQL Database
In this step you will add a PostgreSQL user named cmix, set a password and create the gateway database.
Create PostgreSQL User cmix
danger
- Do not re-use the Ubuntu user's password.
- Make a note of this new password. It will be required in a later steps.
sudo -u postgres createuser --createdb --pwprompt cmix
Create the cmix_gateway Database
sudo -u postgres createdb -O cmix cmix_gateway --encoding='utf-8' --locale='C.UTF-8' --template='template0'
Verify the cmix_gateway Database
Log Into cmix_gateway
psql -U cmix -d cmix_gateway -h 0.0.0.0 -p 5432
You are now connected to the cmix_gateway database as cmix. Note the command-line prompt ...
cmix_gateway=>
List the Databases
\list
You should see a row reading ...
cmix_gateway | cmix | UTF8 | C.UTF-8 | C.UTF-8 |
Log Out of cmix_gateway
\quit
You should now see the terminal command prompt.