Why does MySQL not write the log file?

I wanted to switch on the query log of MySQL. So I added the following to /etc/my.cnf

[mysqld]
log = /var/log/mysql.log

and restarted the server: sudo /etc/init.d/mysql restart, but no log file occured even if I executed some queries.

The Problem was that mysql had no rights for /var/log. So the solution was to create an own directory for mysql

cd /var/log
sudo mkdir mysql
sudo chown mysql:mysql mysql/

and log into it:

log = /var/log/mysql/mysql.log
Advertisements

jQuery iframe-ThickBox removes parameter

I had a iframe-ThickBox link with a strange behaviour: Clicking on it leads to an application error (because the id param was missing), copying the url in a new browser tab worked well.

<a href="/controller/action?TB_iframe=true&height=500&width=650&id=123">link</a>

What happened? jQuery-Thickbox removes all parameters after TB as mentioned in the description:
Important to Remember:
Add all other query parameters before the TB_iframe parameters. Everything after the “TB” is removed from the URL.

So rearranging the order fixed the problem.

<a href="/controller/action?id=123&TB_iframe=true&height=500&width=650">link</a>

The real problem was not so obvious, because we use a link-Tag which transformed the URL in a map to add parameters and transformed it back to a URL. In that transformation the order got lost. We fixed that problem with a LinkedHashMap instead of HashMap.