Read more
How to enable MySQL query logging
This will make MySQL log all received queries so you can see for yourself what happens on the database level.
Opscomplete
powered by
Save money by migrating from AWS to our fully managed hosting in Germany.
-
Trusted by over 100 customers
-
Ready to use with Ruby, Node.js, PHP
-
Proactive management by operations experts
Read more
Show archive.org snapshot
Don't switch this on for production machines!
- Edit your
my.cnf
:
sudo vim /etc/mysql/my.cnf
- In the
[mysqld]
section, add:
log=/var/log/mysql.log
- Restart your MySQL daemon. On Ubuntu:
sudo service mysql restart
Note that your MySQL performance will suffer. But when you need to enable query logging for a debug fest, you probably don't care about that.
Posted by Arne Hartherz to makandra dev (2012-07-20 16:40)