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 7176437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:30:25+00:00 2026-05-28T16:30:25+00:00

We are creating a few slave servers using an existing single mysql server. We

  • 0

We are creating a few slave servers using an existing single mysql server. We know all about the my.cnf settings, user creation, etc etc. Both on the master and slave side. We are more interested about the initial database creation on the slaves.

The existing server will be the master, the new ones will all be slaves.

We were wondering the procedure when creating new slaves using an existing database.

Here is what we have done, please let us know if this is correct.

a) Existing single mysqld taken offline (what will in the end be the master).

b) Via my.cnf, we changed the port from the 3306 to something random. We did this to make sure that when we bring the server up to do the mysqldump, no writes are made. This will ensure, 100% that the dump will be 100% recent.

c) mysqldump of existing database made.

d) mysqld taken offline again.

e) binlogs purged. We did this by simply deleting them. Which appears to be ok, since having a peak at the binlog after starting mysqld back up, there were re-initialized back at 000001.

f) Existing mysqld server brought up using old port, so our webservice could go back up while we set everything up.


So… If my thinking is correct, at this point we should have:

mysqldump + binlogs = 100% current database.


The reason I am asking all of this is because doing a:

mysql DATABASE < dumpfile.sql

Is taking about 2 hours, with probably another 2 hours to go.

Will we have any major issues with the slave ‘catching up’ with 3-4 hours worth of binlogs?

Thank you kindly.

  • 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-28T16:30:26+00:00Added an answer on May 28, 2026 at 4:30 pm

    You don’t necessarily have to take mysqld offline or change the port. You can use FLUSH TABLES WITH READ LOCK to ensure no writes happen while you’re noting the binlog position and creating the dump.

    Restoring a dump usually takes a long time, probably a lot longer than it took to create the dump. If your master is recording a very high rate of new changes, then yes, it may take a while for the replica to catch up once you finish the restore on the replica and start replication.

    An alternative you can use, if shutting down mysqld is acceptable, is to copy the physical data directory from master to replica, instead of doing the dump and restore. So initializing the replica can be very quick, basically just as long as it takes to run rsync to copy the files from one server to the other.

    note: You must shut down mysqld on master and replica as you do this, otherwise you have a risk that some of the data is buffered and won’t be included in the file copy. Remember to check file ownership and permissions on the replica before starting mysqld on the replica.

    You should read these sections from the manual for more details:

    • http://dev.mysql.com/doc/refman/5.5/en/replication-howto-existingdata.html
    • http://dev.mysql.com/doc/refman/5.5/en/replication-howto-mysqldump.html
    • http://dev.mysql.com/doc/refman/5.5/en/replication-howto-rawdata.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a server management interface for a few of my servers (which host
Having worked with Classic ASP for about 2 years now by creating a few
I have read a few tutorials and in a book about using Active Record,
I have a few things about saving logged in user, save_model() and save_formset() from
I have few questions about Doctrine and MySQL working together. I don't understand it
I am creating few pages (including login page) which should only be accessible by
I'm creating a few web forms that have areas to them. Are fieldsets viable
I'm creating quite a few SSIS packages to drive document composition (e.g. utility bills,
I am creating a framework in PHP and need to have a few configuration
I am creating a web application which has a few management screens, where 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.