bin/lhm-spec-grants.sh in lhm-2.1.0 vs bin/lhm-spec-grants.sh in lhm-2.2.0
- old
+ new
@@ -1,8 +1,8 @@
#!/bin/sh
-source ~/.lhm
+source `dirname $0`/lhm-config.sh
master() { "$mysqldir"/bin/mysql --protocol=TCP -P $master_port -uroot; }
slave() { "$mysqldir"/bin/mysql --protocol=TCP -P $slave_port -uroot; }
# set up master
@@ -10,10 +10,10 @@
echo "create user 'slave'@'localhost' identified by 'slave'" | master
echo "grant replication slave on *.* to 'slave'@'localhost'" | master
# set up slave
-echo "change master to master_user = 'slave', master_password = 'slave', master_port = 3306, master_host = 'localhost'" | slave
+echo "change master to master_user = 'slave', master_password = 'slave', master_port = $master_port, master_host = 'localhost'" | slave
echo "start slave" | slave
echo "show slave status \G" | slave
# setup for test