MySQL Replikation neu starten

Posted: 12th Dezember 2011 by Thorben Hemmler in MySQL

Mysql Replikation neu starten

### Master ###

mysql> show master status;
+—————-+———-+————–+——————+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+—————-+———-+————–+——————+
| db0-bin.000123 | 123456789| | |
+—————-+———-+————–+——————+
1 row in set (0.00 sec)

### Slave ###

mysql> slave stop;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> CHANGE MASTER TO master_host= ‚10.10.10.10‘,master_user=’username‘ , master_port=3306, master_log_file=’master-bin.000123′, master_log_pos=123456789;
Query OK, 0 rows affected (0.01 sec)

mysql> slave start;
Query OK, 0 rows affected (0.00 sec)