Sakai Logo
 

5. Database Configuration

5.1 Deploy Drivers


The supported production-grade databases include MySQL 4.1+ and Oracle 9i+. The version of the JDBC driver (or connector) is also important. For MySQL the 3.1.10 connector should be used, while for Oracle the 10g driver should be used, even if the database is version 9i. The 9i driver will not be sufficient.
MySQL drivers
There have been a number of problems reported with the 3.1.11 MySQL driver. We currently recommend 3.1.10 instead.

You need to have appropriate JDBC drivers for your database installed in your $CATALINA_HOME/common/lib directory, and they are available from the official sites for both Oracle and MySQL.

5.2 Create Sakai Database and User


A Sakai database and privileged user must be prepared for Sakai's use. Consult your database documentation for details, but here are sample commands for MySQL:

C:\sakai\reference\sql\legacy\mysql\>
mysql -u root -p
Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 51 to server version: 4.1.5-gamma-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database sakai default character set utf8; Query OK, 1 row affected (0.00 sec) mysql> grant all on sakai.* to sakaiuser@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec mysql> grant all on sakai.* to sakaiuser@'127.0.0.1' identified by 'password';
Query OK, 0 rows affected (0.00 sec) mysql> quit

5.3 Database Properties

Significant Change to DB configuration
The process of setting database properties has changed significantly from previous versions of Sakai. Specifically, the placeholder.properties file in its entirety has been deprecated, and all configuration settings are now made in sakai.properties.

There are settings in sakai.properties that also define the database technology and connection information. Appropriate sakai.properties settings for Oracle and MySQL, respectively, are listed below (although some pieces will of course need to be altered appropriately for your installation):

5.4 Upgrade Scripts

If you have been running version 2.0 of Sakai, you will need to apply a SQL script to convert your database appropriately. The latest version of these scripts can be found in the maintained production branch on subversion (you can also find the scripts in docs/updating of a downloaded archive, but this might not include the latest bug fixes), in versions for both MySQL and Oracle, respectively:
https://source.sakaiproject.org/svn/branches/sakai_2-1/docs/updating/