Home arrow Journal arrow Today Quick Tip: log your MySQL server querries
Today Quick Tip: log your MySQL server querries PDF
Tuesday, 26 April 2011
To log MySQL Querries for debug purposes we edit /usr/local/etc/rc.d/mysql-server script and add

  --log=/var/log/mysql.log

After that we create mysql.log file:

  touch /var/log/mysql.log
  chown mysql /var/log/mysql.log

Our full line from /usr/local/etc/rc.d/mysql-server script will look like this:

command_args="-c -f /usr/local/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --log=/var/log/mysql.log --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"

Note tjat --log option must be before ${mysql_args} option.

Last Updated ( Tuesday, 26 April 2011 )
 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?