Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-11-2012, 07:17 AM   #1
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Question MySQL Slave - Log queries including those executed on Slave Replay

Hi All,
I'm wanting to know if its possible for me to log the queries the Slave is executing from the relay log with-in the general query log? I've enabled general_log on the slave which is writing to general_log table, however I'm not seeing any of the queries the slave is replaying. Is this possible? The reason being on AWS RDS MySQL you can't have access to the binlogs on master or on slave (can't turn on log_slave_updates either) and I don't want to turn on the general_log on the production server, thus hoping this will work as an option? Do I need to do something else to get this working or is it simply not possible?

I've also tried to get the information out by enabling slow_query_log and setting long_query_time=0. But again I get queries in there but nothing relating to the queries being executed by the slave replaying the log.

It appears as though my only option is enabling these things on the primary which i'm trying to avoid due to the performance implications. So if there's a way of doing this on the slave which can log to table that would be awesome.

Many thanks,


log, mysql, slave

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Master-Slave Replication - How to make the slave read-only? saagar Linux - Server 1 08-31-2010 09:13 AM
[SOLVED] MySQL 5.1 not replicating properly with slave gimpy530 Linux - Server 2 08-03-2010 10:44 AM
MySQL Master-SLave Replication?? linuxshadow Linux - Server 7 06-13-2008 10:22 AM
Multiple Master to one Slave for MySQL Replication Swakoo Linux - General 0 03-31-2007 05:40 AM
mysql slave replication question muxman Linux - Software 2 10-22-2006 08:49 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration