How to find out all the commands executed on a MySQL database within a given timeframe?

For queries which change data, you can check the binary log. However, I don't think this'll get you the user: $ mysqlbinlog /var/log/mysql/mysql-bin.000145 … # at 3178 #090805 6:25:15 server id 1 end_log_pos 3373 Query thread_id=2170317 exec_time=0 error_code=0 SET TIMESTAMP=1249467915/*! */; UPDATE phpbb3_topics SET topic_views = topic_views + 1, topic_last_view_time = 1249467915 WHERE topic_id = 95847/*!

*/; # at 3373 … To get the user, you'll need to set up triggers on the tables and use those triggers to store an audit log in another table If you need to all queries—selects included—there is also the general query log but that is not normally on due to performance impacts and disk requirements.

For queries which change data, you can check the binary log. However, I don't think this'll get you the user: $ mysqlbinlog /var/log/mysql/mysql-bin.000145 … # at 3178 #090805 6:25:15 server id 1 end_log_pos 3373 Query thread_id=2170317 exec_time=0 error_code=0 SET TIMESTAMP=1249467915/*! */; UPDATE phpbb3_topics SET topic_views = topic_views + 1, topic_last_view_time = 1249467915 WHERE topic_id = 95847/*!

*/; # at 3373 … To get the user, you'll need to set up triggers on the tables and use those triggers to store an audit log in another table. If you need to all queries—selects included—there is also the general query log but that is not normally on due to performance impacts and disk requirements.

dev.mysql.com/doc/refman/5.0/en/binary-l... Binary log might help a bit.

For example, I would like to know who executed insert command on a database table in the last 24 hours. Any help would be greatly appreciated.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions