Zend Server CE includes an installation of MySQL, which is very handy. Since Zend Server CE is used mostly to setup a quick development environment, it is very useful to view the MySQL query log, where all SQL queries are logged.
To enable the query log, you need to modify the file /usr/local/zend/mysql/bin/mysql.server:
- Locate the following line:
$bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
- Modify it by adding ‘-l’ so it looks like:
$bindir/mysqld_safe -l --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
Then, restart mysql by running:
/usr/local/zend/mysql/bin/mysql.server stop /usr/local/zend/mysql/bin/mysql.server start