Master logs for all the operations performed on mysql DB

Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 11-24-2012
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
# 2  
Old 11-24-2012
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
# 3  
Old 11-24-2012
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 :-(

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. :-(
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
If I ran perl script again,old logs should move with today date and new logs should generate. Sanjeev G Shell Programming and Scripting 1 03-14-2018 04:27 PM
How can I replicate master master and master master MySQL databse replication and HA? Palak Sharma UNIX Desktop Questions & Answers 0 05-15-2014 02:15 AM
System administration tasks performed from a menu driven interface femchi UNIX for Dummies Questions & Answers 2 11-07-2012 03:21 PM
How to grep the content performed by an User duppalav Shell Programming and Scripting 0 08-10-2012 09:43 AM
logs of commands performed by users prpkrk UNIX for Dummies Questions & Answers 1 10-14-2011 07:31 AM
MySQL Daemon failed to start - no mysql.sock file jastanle84 UNIX and Linux Applications 3 10-12-2011 03:56 PM
smit see comand performed ?? prpkrk AIX 5 08-30-2011 05:28 AM
MySQL Master-Slave Configuration: Don't Replicate a Row of a Table? Neo Web Development 5 10-09-2010 02:56 PM
Grep yesterday logs from weblogic logs harish.parker Shell Programming and Scripting 3 11-04-2008 09:00 AM