Index: trunk/tools/switch-master/20-newmaster-pos |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | . config |
5 | 5 | |
Index: trunk/tools/switch-master/10-master-readonly |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | . config |
5 | 5 | |
Index: trunk/tools/switch-master/40-newmaster-rw |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | . config |
4 | 4 | |
5 | 5 | ssh root@$newmaster 'sed -i~ '\''s/^\s*read-only/#read-only/'\'' /etc/my.cnf' |
Index: trunk/tools/switch-master/15-master-pos |
— | — | @@ -1,4 +1,4 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | . config |
5 | 5 | |
Index: trunk/tools/switch-master/30-slaves |
— | — | @@ -1,9 +1,9 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | 4 | . config |
5 | 5 | |
6 | 6 | # Turn off slave on new master, to avoid replication loop |
7 | | -echo "slave stop;" | mysql -h $newmaster |
| 7 | +echo "slave stop; change master to master_host=''" | mysql -h $newmaster |
8 | 8 | |
9 | 9 | # Change slaves to use new master |
10 | 10 | sql=" |