Hinweis: Sie sind auf den Seiten der Moodle 1.9 Dokumentation. Die Dokumentation der aktuellsten Moodle-Version finden Sie hier: Moodle-Datenbank.

Moodle-Datenbank

Aus MoodleDocs
Wechseln zu:Navigation, Suche

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.

Siehe en:Create Moodle site database


Beachten Sie, dass die Moodle-Version 1.5 (bzw. 1.5.x) nicht mit MySQL 5.x's new "STRICT_TRANS_TABLES" Einstellung arbeitet. Wenn Sie aber MySQL 5.x benutzen, editieren Sie MySQLs Konfigurationsdatei (mit dem Namen "my.ini" in Windows und "my.cnf" in Unix/Linux) und löschen Sie diese Option. Sie müssen die Datenbank neu starten, nachdem Sie die Änderungen durchgeführt haben.

Wenn Sie Direktzugriff auf die Kommandozeile eines Unix-/Linux-Systems haben, können Sie auch über Kommandozeilenaufrufe alle Arbeiten erledigen.

Hier die wichtigsten Kommandozeilenbefehle für eine MySQL-Datenbank (rote Schrift ist für eine Moodle-1.6-Version und höher, weglassen für Moodle 1.5 und frühere Versionen):

  # mysql -u root -p
  > CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
  > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.* 
          TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; 
  > quit 
  # mysqladmin -p reload
   

Und hier ein Beispiel für eine PostgreSQL-Datenbank:

  # su - postgres
  > psql -c "create user moodleuser createdb;" template1
  > psql -c "create database moodle with encoding 'unicode';" -U moodleuser template1
  > psql -c "alter user moodleuser nocreatedb;" template1
  > psql -c "alter user moodleuser with encrypted password 'yourpassword';" template1
  > su - root
  # /etc/init.d/postgresql reload

Wenn Sie Webspace bei einem Internetprovider gemietet haben, stellt dieser meistens eine Weboberfläche zur Verfügung, um eine Datenbank anzulegen. Am weitesten verbreitet ist das System cPanel. system is one of the most popular of these. To create a database using cPanel:

  1. Click on the MySQL Databases icon.
  2. Type moodle in the New Database field and click Create Database.
  3. Type a username and password (not one you use elsewhere) in the respective fields and click Create User.
     Note that the username and database names may be prefixed by your cPanel account name and an underscore, and truncated to 16 characters. When entering this information into the Moodle installer - use the full names.
  4. Now use the Add Users to Databases button and give this new user account ALL rights to the new database. 

Continue with Creating the data directory