Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7666227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:46:50+00:00 2026-05-31T14:46:50+00:00

Ok here is my scenario Server running master DB with other DB’s for each

  • 0

Ok here is my scenario

Server running master DB with other DB’s for each site also on server.
an update is written to master DB, and a trigger inserts this record into the relevant DB for a specific site which is intended to be replicated down to site DB level.

Trigger works fine, but the inserted record doesnt make it to the slave DB. I am using statement based replication as row based isnt an option. I have also tried calling a stored procedure and doing this as an event but nothing comes through.

Is there any way around this – by the way i am using MySQL 5.1

Thanks

Syntax for trigger below

dbmaster=server master db
dbsite= server site DB (this is the replication master)

delimiter # 
create trigger rstreplicate after insert on dbmaster.exchange 
for each row begin insert into dbsite.exchange 
select distinct new.TYPE, new.FILENAME, new.STATUS, new.USER_ID, new.INP_DATE, new.CHG_DATE from dbmaster.exchange where new.IP='127.0.0.1'; 
end# 
delimiter ;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:46:51+00:00Added an answer on May 31, 2026 at 2:46 pm

    From MySQL documentation:

    B.5.12: Do triggers work with replication?

    Yes. However, the way in which they work depends whether you are using
    MySQL’s “classic” statement-based replication available in all
    versions of MySQL, or the row-based replication format introduced in
    MySQL 5.1.

    When using statement-based replication, triggers on the slave are
    executed by statements that are executed on the master (and replicated
    to the slave).

    When using row-based replication, triggers are not executed on the
    slave due to statements that were run on the master and then
    replicated to the slave. Instead, when using row-based replication,
    the changes caused by executing the trigger on the master are applied
    on the slave.

    So, you’ll need the statements that are triggering the trigger to replicate to the slave, and you’ll need to create duplicate triggers on the slave that will apply the same updates in response to the statements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my scenario. I've got SharePoint 2010 running on one server, with an SQL
Here's the scenario. I am code running on a web server in an AD
scenario: in-house web server running apache2, here are the virtual hosts: domain.com <-- for
Here is the scenerio: We have an application running on Webphere Portal Server 6.1
Here is the scenario: SQL Server 2000 (8.0.2055) Table currently has 478 million rows
Here's the scenario: You have a Windows server that users remotely connect to via
Here is the scenario: IIS 6 and SQL Server 2005 on same machine: I
Here's the scenario: You have an ASP.Net application supported by a Microsoft SQL Server
I've looked through several other questions here and on other sites regarding this issue,
I feel like this behavior should not be happening. Here's the scenario: Start a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.