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

  • Home
  • SEARCH
  • 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 8422145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:21:31+00:00 2026-06-10T03:21:31+00:00

I have a questions here about MySQL replication. I have a very limited knowledge

  • 0

I have a questions here about MySQL replication. I have a very limited knowledge about database. Please someone help me to clarify this. My goal is to be able to do a deployment that can avoid downtime.

Suppose I have a DB replicated (master and slave). Suppose I want to do a new release, and I need to run a migration script. My plan is to stop the replication. And run the script in the slave. The migration script can be as:

  • Based on some business logic, running multiple queries to set new values for a column in a table.
  • Adding new column

What would actually happen when I start the replication again? The slave will catch up of any changes on the master. But how would the master get the changes that was applied to the slave? If i run the same database script, the migration script won’t be run again against the same data set on the master.

Would it make sense, if once the slave catch up with the master, to use the snapshot of the slave and use it as the new slave. And old slave become master?

I hope this actually is clear. Thanks. Any help is really appreciated.

  • 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-06-10T03:21:33+00:00Added an answer on June 10, 2026 at 3:21 am

    You either have to do cross master replication in order for the slave to catch up with the master and the master to copy the modifications carried out on the salve or have some down time and run the script of the master.

    1- You can change the slave master replcaition to cross master without any down time.
    2- stop the ex-slave from replicating the master.
    3- run your script.
    4- start the ex-slave again.

    I recommand that you setup a testing environment using a tool like vmware and try it out. That’s what I have done.

    HERE IS A LINK THAT EXPLAINS HOW TO SET IT UP

    http://onlamp.com/onlamp/2006/04/20/advanced-mysql-replication.html

    I can’t stress enough on testing before applying the changes on a real environment, so test again and again untill you think that you’re ready. When that happens test one more time. DON’T FORGET TO MAKE A BACKUP TOO

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

Sidebar

Related Questions

I have read many questions here about using mysql in background using php, and
I have posted a question about multilanguage database design here, [] What are best
Ok I have looked at a few questions on here concerning this topic. But
There have been a decent amount of questions about mysql spatial datatypes, however mine
I know there have been numerous questions here about inline sql vs stored procedures...
I have a simple question about MySQL and PHP here. Let's say I have
I have two questions about Compound-Statement and Transactions in MySQL. FIRST: There are two
I Have wrote a question which got a right answer here about emysql encoding.
i have asked a question about manytomanyfield here which i solved but now a
I have a question about ClientBootStrap. Here is the scenario; Client_X wants to join

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.