The procedure describes setting up the database server using the psql command-line tool. The role name of the user who will own the new database , or DEFAULT to use the default (namely, the user executing the command). As some of the point out, createdb is a command line utility that could be used to create database.
To create a database , type the following command. Assuming you have a user named dbuser, the following command could be used to create a database and provide access to dbuser:. Use psql to edit, automate, and execute queries in PostgreSQL.
PostgreSQL is an open source relational database management system. Initially, the empty table in the current database is owned by the user issuing the command. FATAL: role Jonas does not exist I have also tried to create a role Jonas with createuser Jonas but I got the same error, even if I was logged in as Administrator in PowerShell. Psql is an interactive terminal program for working with PostgreSQL. Step 2) Press enter five times to connect to the DB.
It provides a visual, user-friendly environment with a host of practical solutions that make managing databases easy. Start terminal and execute the followingcommand: sudo -u postgres psql postgres. Now run the following command to create a database. This command creates a database w3r.