Edit /etc/my.cnf
Add in the following line to the [mysqld] section:
log=/var/log/mysql_query.log
touch /var/log/mysql_query.log
chmod 644 /var/log/mysql_query.log
chown mysql:mysql /var/log/mysql_query.log
sudo /sbin/service mysqld restart
No comments:
Post a Comment