MySQL: Log only drop/create commands

MySQL

Is there a way to log only certain MySQL operations?

I need to enable it's log in a production server but only for drop/create commands. Unfortunately logging everything is slow and I only need these specific commands.

Best Answer

There is no sophisticated way to log queries in mysql. The only thing you can do is the following:

The general query log is a general record of what mysqld is doing. The server writes information to this log when clients connect or disconnect, and it logs each SQL statement received from clients. The general query log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld.

http://dev.mysql.com/doc/refman/5.1/en/query-log.html

Related Topic