Sha256: 5537e6115996b3e59ce4b24503dec03c4497b64702e068b628950141766c743c

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

#!/bin/sh

source .config

master() { "$mysqldir"/bin/mysql --protocol=TCP -P $master_port -uroot; }
slave()  { "$mysqldir"/bin/mysql --protocol=TCP -P $slave_port -uroot; }

# set up master

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 "start slave" | slave
echo "show slave status \G" | slave

# setup for test

echo "grant all privileges on *.* to ''@'localhost'" | master
echo "grant all privileges on *.* to ''@'localhost'" | slave

echo "create database lhm" | master
echo "create database if not exists lhm" | slave

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lhm-1.0.0.rc4 spec/config/grants