Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring Sakai to use MySQL is an excellent option both for local development and production purposes.

(info) You will not need to create Sakai database objects (tables, indices, etc) when setting up your database. Sakai generates its own database schema automatically during the Tomcat setup process via the autoDDL setting in sakai.properties.

first, confirm whether or not MySQL is installed on your system by checking the version from the command line:

No Format

mysql --version
No Format

mysql  Ver 14.12 Distrib 5.0.51a, for apple-darwin8.11.1 (i686) using readline 5.0

If MySQL is not installed, download and install the MySQL 5.0 package or binaries:

MySQL Community Server

 

MySQL 5.0

http://dev.mysql.com/downloads/mysql/5.0.html

Assign a password for the root account:

No Format

mysql -u root -pmysqlpassword

Create a Sakai database and user/password:

No Format

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 'sakaipassword';
Query OK, 0 rows affected (0.00 sec

mysql> grant all on sakai.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit