Chris@0: Chris@0: CREATE THE PostgreSQL DATABASE Chris@0: ------------------------------ Chris@0: Chris@0: Note that the database must be created with UTF-8 (Unicode) encoding. Chris@0: Chris@0: 1. CREATE DATABASE USER Chris@0: Chris@0: This step is only necessary if you don't already have a user set up (e.g., by Chris@0: your host), or want to create a new user for use with Drupal only. The Chris@0: following command creates a new user named 'username' and asks for a password Chris@0: for that user: Chris@0: Chris@0: createuser --pwprompt --encrypted --no-createrole --no-createdb username Chris@0: Chris@0: If there are no errors, then the command was successful. Chris@0: Chris@0: 2. CREATE DRUPAL DATABASE Chris@0: Chris@0: This step is only necessary if you don't already have a database set up Chris@0: (e.g., by your host) or want to create a new database for use with Drupal Chris@0: only. The following command creates a new database named 'databasename', Chris@0: which is owned by the previously created 'username': Chris@0: Chris@0: createdb --encoding=UTF8 --owner=username databasename Chris@0: Chris@0: If there are no errors, then the command was successful. Chris@0: Chris@0: 3. CREATE SCHEMA OR SCHEMAS (Optional advanced step) Chris@0: Chris@0: Drupal will run across different schemas within your database if you so wish. Chris@0: By default, Drupal runs inside the 'public' schema but you can use $db_prefix Chris@0: inside settings.php to define a schema for Drupal to run inside of, or Chris@0: specify tables that are shared inside of a separate schema. Drupal will not Chris@0: create schemas for you. In fact, the user that Drupal runs as should not be Chris@0: allowed to do this. You'll need to execute the SQL below as a superuser, Chris@0: replace 'username' with the username that Drupal uses to connect to Chris@0: PostgreSQL, and replace 'schema_name' with a schema name you wish to use, Chris@0: such as 'shared': Chris@0: Chris@0: CREATE SCHEMA schema_name AUTHORIZATION username; Chris@0: Chris@0: Do this for as many schemas as you need. See default.settings.php for Chris@0: instructions on how to set which tables use which schemas.