#freeze
-MySQL関連のWikiへのリンク
--[[MySQL:http://wiki.gashimax.com/index.php?MySQL]]
--MySQL 5.1
--MySQL 5.4
--MySQL/InnoDB
--MySQL/エラー
--MySQL/クラスタリング
--MySQL/サーバ移動
--MySQL/チューニング
--MySQL/バージョン
--MySQL/バックアップ
--MySQL/プロファイリング
--MySQL/ベンチマーク
--MySQL/レプリケーション
--MySQL/ロック
--MySQL/制限
----

-[[MySQLリファレンスマニュアル 第5章 レプリケーション:http://dev.mysql.com/doc/refman/5.1/ja/replication.html]]

-[[MySQL レプリケーションの設定:http://wiki.bit-hive.com/tomizoo/pg/MySQL%20%A5%EC%A5%D7%A5%EA%A5%B1%A1%BC%A5%B7%A5%E7%A5%F3%A4%CE%C0%DF%C4%EA]]
-[[現場指向のレプリケーション詳説:http://www.irori.org/doc/mysql-rep.html]]

-[[MySQLレプリケーションを安全に利用するための10のテクニック:http://nippondanji.blogspot.com/2009/03/mysql10.html]]

* レプリケーションの設定 [#d61e9c36]
** 対象DB・テーブル、除外DB・テーブルの設定 [#m4147863]
-/etc/my.cnf に以下のようにずらずらと記述する
-複数指定したい場合は複数行書けば良い
-show slave status で設定が有効になっているか確認すべし
 replicate-wild-do-table = repl_%.% ............ repl_●.● はレプリケーション
 replicate-ignore-db = repl_test2 .............. repl_test2 は除外
 replicate-ignore-db = repl_test3 .............. repl_test3 は除外
 replicate-ignore-table = repl_test.hogehoge ... repl_test  のhogehogeテーブルは除外

* エラー対応 [#i42c9d5f]
** Query caused different errors on master and slave. [#na56ab7e]
-[[http://mhamano.blog76.fc2.com/blog-entry-14.html]]

-エラー内容を見て、エラーになったSQLが処理的にスキップして問題ないものならスキップする
 mysql> stop slave;
 mysql> show slave status \G; ... スレーブが止まったのを確認
 mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; ... エラーをスキップ
 mysql> start slave;
 mysql> show slave status \G; ... スレーブが再開されたのを確認

* レプリケーションの監視 [#mc729906]
-[[Check MySQL Replication Slave Status:http://www.day32.com/MySQL/]]
-[[MySQL Replication Monitor:http://www-jp.mysql.com/products/enterprise/monitor.html]]
-[[mysqlレプリケーションの監視:http://inokara.cocolog-nifty.com/blog/2008/02/mysql_6917.html]]
-[[NagiosによるMySQLの監視:http://webframe.sourceforge.jp/wiki/index.php?Nagios%A4%CB%A4%E8%A4%EBMySQL%A4%CE%B4%C6%BB%EB]]
-[[レプリケーションの遅延を計るシンプルな方法:http://d.hatena.ne.jp/ringmaster/20080411/1207908692]]

* レプリケーションの遅延 [#g6fd59de]
-[[MySQLのレプリ遅延の原因を調べる方法:http://www.deftrash.com/blog/archives/2009/06/mysql_repli.html]]
-[[MySQLレプリケーションの遅延:http://www.hirohama.biz/mysql/2007/07/09-150711.html]]

** 遅延対策 [#c2e93ddd]
-スレーブ側の処理はシングルスレッドであることを忘れるな

-[[スレーブへのレプリケーションのタイムラグを解消:http://d.hatena.ne.jp/hironey/20100814/1281751980]] ... innodb_flush_log_at_trx_commit の値を変える。効果はあるがリスクもあり。
--[[MySQL開拓団 ストレージエンジンの吟味 (2):http://www.klab.jp/media/mysql/index3.html]] ... innodb_flush_log_at_trx_commit に関する解説が詳しい
--[[innodb_flush_log_at_trx_commitの誤解・・・:http://modperlis.bounceme.net/2007/09/innodb-flush-log-at-trx-commit.html]] ... 6倍ぐらい速くなるらしい
--[[MySQLにおけるinnodb_flush_log_at_trx_commitの設定値のまとめ:http://it.kndb.jp/entry/show/id/2593]]

* 製品 [#d6687cf9]
-[[Tungsten Enterprise for MySQL:http://www.softagency.co.jp/products/continuent/]]

* ツール [#jbb3dc74]
-[[MySQL Replication Manager:http://matt.simerson.net/computing/sql/mrm/]]

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS