×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

MySQL replication slave server re-sync issue

MySQL replication slave server re-sync issue

MySQL replication slave server re-sync issue

(OP)
Hi Im Newbie of MySQL user,

Currently im encounter MySQL replication slave server fail sync very frequently like almost happen every month due to slave server power shutdown unexpectedly ,
then as i know if want re-sync replication slave , need stop slave then backup & restore to slave and then start slave again like step below.

1) login mysql replication slave server, then i run Stop Slave for channel 'DBname-01';

2) at master server need backup like example below
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqldump -h 192.168.1.1 -P3306 -uroot -ppassxxxx DBname > C:\Temp\DBname_21022022.dump

3) then restore db to slave server
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -h 192.168.1.2 -P3306 -uroot -ppassxxxx DBname < C:\Temp\DBname_21022022.dump

4) at slave server,i change master_log_file & master_log_pos, then i run
change master to master_log_file='mysql-bin.000002',master_log_pos=123456 for CHANNEL 'DBname-01';

5) login mysql replication slave server, then i run Start Slave for channel 'DBname-01';


* But is very time consuming and somemore only can do non-operation hours especially do backup and restore part due to file size.
Is it possible any "shortcut way" can skip the database backup & restore to replication slave server step (which is item 2 and 3 )?bow :'(

2) at master server need backup like example below (can skip this step ?)
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqldump -h 192.168.1.1 -P3306 -uroot -ppassxxxx DBname > C:\Temp\DBname_21022022.dump

3) then restore db to slave server (can skip this step too ?)
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -h 192.168.1.2 -P3306 -uroot -ppassxxxx DBname < C:\Temp\DBname_21022022.dump


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close