MySQL DBA - Tips and Techniques Magazine

14 Oct 2014

Setup replication user “REPL”

1) Add the following master information to the new servers my.cnf file.  This was taken from the master servers my.cnf file.


# The replication master for this slave - required
master-host     =   mk-myserver-1.uk.intranet
#
# The username the slave will use for authentication when connecting
# to the master - required
master-user     =   repl
#
# The password the slave will authenticate with when connecting to
# the master - required
master-password =   lkhhdsgs7


2) Check to see if new slave can connect to master using user "repl".

Run on slave
 - mysql -hmk-myserver-1.uk.intranet -urepl -plkhhdsgs7

 If not,  then run the following on master :

GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 
repl@"mk-myserver-3.uk.intranet" IDENTIFIED BY 'lkj5lv327'

check again to see if slave can connect to master :

run on slave
- mysql -hmk-myserver-1.uk.intranet -urepl –p<paswd>

You should be able to connect now.


No comments:

Post a Comment