the step:

  1. stop slave;
  2. change master to master_host=’server_ip’, master_log_file=’the bin-log file on the master server’, master_log_pos=the position of the bin-log file;
  3. start slvae;

how to find the correct bin-log file and its position number?

on myster server, type this command

show master status;

you will get the information you wanted by the mysql server.

change master server on a slave mysql server

發表迴響

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Verified by MonsterInsights