close

MySQL Replication 的問題(同步中斷)

我的248與132常常同步出問題
也找不出原因
只好時常停止兩邊的資料庫
把MASTER的拷到132
再砍掉雙方的BIN 以及 INFO 檔
加砍248的 /var/run/mysqld/mysqld-relay-bin.*  (080908)
重新啟動就解決了

治標不治本 唉

---/var/www/html/makoto/sqlreplication.sh

cd /
usr/local/mysql/support-files/./mysql.server stop

cd /var/lib/mysql/
tar -zcpf Webdata.tar.gz ./Webdata
tar -zcpf VIP.tar.gz ./VIP
tar -zcpf worldcity.tar.gz ./worldcity
tar -zcpf TY_Game.tar.gz ./TY_Game
tar -zcpf Questionary.tar.gz ./Questionary

/usr/local/bin/ncftpput -E -u web***** -p go***** 219.87.130.132 ../../lib/mysql/ *.tar.gz
#/usr/local/bin/ncftpput -E -u web***** -p go***** 219.87.130.132 ../../lib/mysql/ Webdata.tar.gz
#/usr/local/bin/ncftpput -E -u web***** -p go***** 219.87.130.132 ../../lib/mysql/ VIP.tar.gz
#/usr/local/bin/ncftpput -E -u web***** -p go***** 219.87.130.132 ../../lib/mysql/ worldcity.tar.gz
#/usr/local/bin/ncftpput -E -u web***** -p go***** 219.87.130.132 ../../lib/mysql/ TY_Game.tar.gz
#/usr/local/bin/ncftpput -E -u web***** -p go***** 219.87.130.132 ../../lib/mysql/ Questionary.tar.gz

cd /var/lib/mysql/
rm newsql-bin.*

cd /
usr/local/mysql/support-files/./mysql.server start


---/var/www/html/testcode/sqlreplication.sh


cd /
service mysqld stop
cd var/lib/mysql/
tar -zxvf worldcity.tar.gz
tar -zxvf TY_Game.tar.gz
tar -zxvf Webdata.tar.gz
tar -zxvf Questionary.tar.gz
tar -zxvf VIP.tar.gz
rm *.info
cd /
rm /var/run/mysqld/mysqld-relay-bin.*
service mysqld start

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 uetoaya 的頭像
    uetoaya

    uetoaya的部落格

    uetoaya 發表在 痞客邦 留言(0) 人氣()