Friday, January 09, 2009
Turning On Mysql Query Logging
Edit mysql configuration file (my.cnf, like /etc/my.cnf) and the add an entry under mysqld section
[mysqld]
log = /var/log/mysqld-all.log
Follow the steps given below:
1. chown mysql:mysql /var/log/mysqld-all.log
2. chmod o-r /var/log/mysqld-all.log
3. /etc/init.d/mysqld restart
Now when you execute sql you should see the log :)
[mysqld]
log = /var/log/mysqld-all.log
Follow the steps given below:
1. chown mysql:mysql /var/log/mysqld-all.log
2. chmod o-r /var/log/mysqld-all.log
3. /etc/init.d/mysqld restart
Now when you execute sql you should see the log :)