hassy-6thsense / server-backup

rdiff-backupによる差分バックアップスクリプト
0 stars 0 forks source link

mysqldump doesn't lock MyISAM Database #1

Closed hassy-6thsense closed 8 years ago

hassy-6thsense commented 8 years ago
mysqldump --quote-names --skip-lock-tables --single-transaction --flush-logs --master-data=2 <database> > dump.sql
mysqldump --quote-names --flush-logs <database> > dump.sql
hassy-6thsense commented 8 years ago

以下コマンドを実行し「MyISAM」をgrepすれば可能?

mysql information_schema --skip-column-names --silent --execute="SELECT engine FROM tables WHERE table_schema = '<database>'"
hassy-6thsense commented 8 years ago

下記のコマンドで、MyISAMのテーブルを持つデータベース名を抽出可能。

mysql [-u <user> -p] information_schema --skip-column-names --silent --execute="SELECT TABLE_SCHEMA FROM information_schema.TABLES WHERE Engine = 'MyISAM' GROUP BY TABLE_SCHEMA"