Sakai, MySQL and storing content in the database

I just noticed that the Sakai Install Docs are missing a small piece of info that may cause some headaches for those using MySQL and store their content in the database rather than on the filesystem.

If you don’t change the MySQL configuration parameter ‘max_allowed_packet’ from its default of 1Mb, you won’t be able to store anything in the database larger than 1Mb. This can be set in your my.cnf file. You can view your current setting by executing ‘show variables;’ from the MySQL console and looking for the parameter max_allowed_packet. It’s default is 1048576 (which is 1Mb in bytes).

It’s probably obvious, but am posting on my blog in case others experience the problem. I normally store content on disk, but just ran into this issue on a default MySQL setup and an out of the box Sakai install. Simple fix but easily overlooked. Whilst the sakai.properties have the settings content.upload.max and various others, nothing is mentioned about the underlying database.

Hope it helps someone.

Advertisements

3 thoughts on “Sakai, MySQL and storing content in the database

  1. Hello All, I m not able find my.cnf file in my MySql Home Directory.There is one file my.ini.Which does not contain Specified parameter.Can any please help me out where i can find my.cnf file or i have to use my.ini file.

  2. >Hi,just put the max_allowed_packet in my.ini and restart mysql.iemax_allowed_packet=32MMake sure you also have enough allocated memory in your JVM, set via JAVA_OPTS, or you will run out of memory when uploading large files.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s