Note: You are currently viewing documentation for Moodle 2.1. Up-to-date documentation for the latest stable version is available here: PostgreSQL.

PostgreSQL: Difference between revisions

From MoodleDocs
No edit summary
Line 16: Line 16:
* Create the database:
* Create the database:
<pre>
<pre>
Create database moodle owner moodleuser;
postgres=# create database moodle owner moodleuser;
</pre>
</pre>


== See also ==
== See also ==

Revision as of 13:23, 1 December 2011

PostgreSQL is one of the two databases that is fully supported by Moodle. A database is a required component of any Moodle installation.

Creating Moodle Database

  • Log into the PostgreSQL command line client. The exact form depends on how your PostgreSQL is configured but will be something like:
$ psql -U postgres
Password for user postgres:

(enter the password for your 'postgres' user set during installation). After some preamble you should see the prompt postgres=#.

  • Create the user for the Moodle database and assign a password:
postgres=# create user moodleuser with password 'yourpassword';

...substituting a suitably strong password.

  • Create the database:
postgres=# create database moodle owner moodleuser;

See also