MariaDB [(none)]> stop slave;
MariaDB [(none)]> show slave status;
MariaDB [(none)]> reset slave all;
MariaDB [(none)]> change master 'conn' to master_host='master ip', MASTER_PORT=3306, master_user='帳號', master_password='密碼', master_log_file='mysql-bin.000001', master_log_pos=12345;
MariaDB [(none)]> start slave 'conn';
MariaDB [(none)]> show all slaves status \G 或 show slave 'conn' status \G
2.跳過錯誤
MariaDB [(none)]> stop slave 'conn';
指定來源名稱
MariaDB [(none)]> set @@default_master_connection='conn';
MariaDB [(none)]> set global sql_slave_skip_counter=1;
MariaDB [(none)]> star slave 'conn';
3.清除多 master 設定
指定來源名稱
MariaDB [(none)]> set @@default_master_connection='conn';
MariaDB [(none)]> reset slave all;
MariaDB [(none)]> set @@default_master_connection='';
0 意見:
張貼留言