Create New PostgreSQL Database
Purpose
This topic describes how to use the psql command to create new database in PostgreSQL environment.
Create New Database
Just run below command and change it with the database value.
[root@gejoreuy ~]# createdb -U username -h hostname -p port -O owner databasename
Note :
- username: The username that to be used to delete PostgreSQL database.
- hostname: The hostname of the PostgreSQL database.
- port: The port number of the PostgreSQL database.
- owner: The database user to own the new database.
- databasename: The PostgreSQL database name.