[asterisk-users] GURUs - How to monitor all MySQL actions on an Asterisk/FreePBX server?

Steve Edwards asterisk.org at sedwards.com
Thu Jul 8 20:55:14 CDT 2010


On Thu, 8 Jul 2010, bruce bruce wrote:

> I have this in /etc/my.cnf:
> 
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
> user=mysql
> old_passwords=1
> log-error=/var/log/mysqld.log
> 
> [mysqld_safe]
> log-error=/var/log/mysqld.log
> pid-file=/var/run/mysqld/mysqld.pid
> log=/var/log/mysql_query.log
> 
> But it doesn't log anything to /var/log/mysql_query.log

Move the "log" line to [mysqld] and restart MySQL. Personally, I'd create 
the log file in /tmp/ so there are no permissions issues.

Be aware that using the query log may expose confidential information if 
you have other users and they have read access to the file.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list