Comment 3 for bug 806044

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ryan, this one was definitely a pretty tough nut to crack, and I appreciate how far you got. Here were the problems I had to get by to get moodle deployed:

*) need to install mysql-client during install so this will work:

CUR_TABLE_COUNT=`mysql -h $DBHOST -u $USER -p $PASSWORD -Nse "SELECT count(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=\"$DATABASE\""`

*) /usr/local/share/moodle/admin/cli/install.php is not executable, so prefix it with 'php' so you run it with the PHP cli.

*) You *must* set an admin password in the site configuration. This is a good thing, but confusing, perhaps check for its existence before letting install.php say that.

*) MySQL refuses to finish the install because the default binlog_format value is 'STATEMENT'. You have to change it on the mysql server to 'MIXED'. The mysql charm does not have this ability yet but I started working on it. For now you have to manually do it before relating moodle to the mysql server. You can do that by just doing :set global binlog_format='MIXED'" in a mysql client as root. You can login as root on the mysql server by doing

juju ssh mysql/0
sudo su -
mysql -uroot -p`cat /var/lib/juju/mysql.passwd`

*) APACHE_LOGDIR is also not set. I'd recommend ditching the extra Log* directives for apache.. they are handled by the basic configuration in the package already.

That should get you back on track to getting the db-relation-changed hook working.