Master logs for all the operations performed on mysql DB

is there any such thing as master logs for all the operations performed on mysql database. thing is i need to find the operations performed on mysql on a linux server running on RHEL 5.7 for the past 2 days. One more thing i found out that the bin logs will be refreshed whenever server goes to reboot. so is there any way i could find the operation done on DB for past 2 days even when server has been rebooted a couple of times. my servers(2 servers) are running as Master - Slave configuration.
Any help will be deeply appreciated.
regards
Vivek

Hi,

if you mean to enable general query log, you may find hints at:
MySQL query logging
but be aware that this kind of logging is generally intended for debugging purposes (it can slow down your db and/or clog disk space).

For the problem of appending-only, you may try a trick if you are on a linux host with 'chattr' command, i.e. see the end of the post:
How To Set File Attributes In Linux Using Chattr Command | All about Linux

Anyway, be aware that this may lead to space consumption as well (setup preliminary tests on non-production system in order to be safe).
see ya
fra

thing is i dont want to enable logging now. i wanted to check the logs for the things which are run on db for past two days... is it possible to find that? or does server has inbuilt logging for all the operations performed on it...?
i checked the link you sent and chattr command is for setting file permission right.
also i have checked in /var/log/mysqld.log but it shows only error traced during mysql start and stop. it wont show mysql operations performed :frowning:

somehow few entries in DB of my server are missing. i wanted to find out how it happened or who did that. so trying to find to out is there any logs where i could trace out this thing. note that this servers are rebooted a couple of times. :frowning: