Creating a new database
Creating a new PostgreSQL database through Webmin's interface is very quick and simple.
How to do it...
Follow these steps to create a database:
Navigate to Servers | PostgreSQL Database Server.
Click the Create a new database link.
Enter a Database name, for instance,
new_db
.Select the user who will have administrative rights to the database from the Owned by user dropdown.
Leave Character set encoding and Database file path set to Default.
Set Template database to
template1
.Click the Create button.
How it works...
Webmin takes the information you provide and creates a new database by connecting to the PostgreSQL server and executing the following command:
CREATE DATABASE new_db WITH OWNER="dbuser" TEMPLATE = template1;
Postgres creates the new database by making a copy of a selected template. The database, template1
, is installed by default to serve as a source of default settings for newly created databases. If you want new databases to have different settings, for instance...