Important MySQL information

Submitted by clavileno on 2007-06-20

In case anyone is having problems with attachments, this might help.

WebIssues comes pre-configured with quite a low attachment limit - above that limit all attachments are put in a folder as files. However you may not want this behaviour, for all sorts of reasons (security being just one of them).

If you raise the pre-configured limit, you'll start getting errors when uploading attachments with a MySQL back-end. This is because MySQL comes pre-configured with a 1M size limit.

To change this you'll need access to your server's my.cnf or my.ini files. In my case, /etc/my.cnf needed the following added to it:

[mysqld]
max_allowed_packet=16M

followed by a mysqld restart. That gets me to 16M which is all I'm prepared to accept on the basis of inconveniencing other users during the upload process! Something I'm looking at is whether WebIssues could automatically zip and split (into multiple archives) attachments :-)

for all sorts of reasons (security being just one of them)

What other reasons do you mean? I don't think security is a good one - obviously you have to set correct permissions for the storage directory and disallow accessing it directly using the web server, but that's not any different from protecting the configuration file which contains the password used to connect to the database :). The main advantage of storing attachments as files is greater efficiency.

But of course your point about configuring MySQL is right. It should also be mentioned that you may have to set the upload_max_filesize and post_max_size directives in php.ini if you want to handle large attachments (whether you store them in the database or not).

Edit: I'm going to put this sort of hints in the user's manual which I'm just creating for the upcoming release.

Something I'm looking at is whether WebIssues could automatically zip and split (into multiple archives) attachments :-)

If you're publishing a very large file, then it's probably already compressed :). Splitting would make sense when storing large files in the database, but as I said, I don't think that's a good idea.

Regards,
Michał