As it is obvious in the title of the question, I am looking for any solutions, even an alternative, to how I am trying to solve it.
I am open to ideas, and I would appreciate any advice and insight to any concern. This is what I assumed the solution to look like:
If I want to run a query that will only execute on the master mysql server and not the slave. assuming we have an environment with replication through query logs. Can I and how would I create a special statement like:
DELETE FROM tablename WHERE column='our filters' AND (**mysql.server_id=1**);
or maybe something where
master_status=true, the idea is to have some value that is different on master from slave. And I want to know is there any complications?
Lets say the master is a production website and only requires data that has been entered in the past month to operate correctly but the slave is where data from years will be saved and later analyzed to change variable on the main (production/master) server.