
|
MySQL Server Replication
[<Back>] [<Edit>]
Automated MySQL Server Replication using Sh / mysqldump You can also use this for 2+ Slaves
#!/bin/sh
#Not for Scale out, See "Replication" on the MySQL manual. (Tutorial to come)
#Run this script on the SLAVE(s)
TMP_DIR=/tmp dumpDATE=$(eval date +%Y-%m-%d-TIME-%H%M)
mysqldump -h <MasterSQL_IP> -u<remote> -p<password> --all-databases > /$TMP_DIR/$dumpDATE.sql mysql -u<remote> -p<password> < /$TMP_DIR/$dumpDATE.sql
#Add it to Cron and you can forget about it.
By: Ted Simbajon
|
|
|
|
|
Ted Simbajon
415.968.9476
San Francisco, CA
t3ddy94123@yahoo.com
Some Rights Reserved 2009© ΤΓΦ
38.107.191.84 Wed 08, 2010
|