Book Image

Webmin Administrator's Cookbook

By : Michal Karzynski
Book Image

Webmin Administrator's Cookbook

By: Michal Karzynski

Overview of this book

Table of Contents (19 chapters)
Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Navigate to Servers | PostgreSQL Database Server.

  2. Click the Create a new database link.

  3. Enter a Database name, for instance, new_db.

  4. Select the user who will have administrative rights to the database from the Owned by user dropdown.

  5. Leave Character set encoding and Database file path set to Default.

  6. Set Template database to template1.

  7. 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...