LoginSignup
18
20

More than 5 years have passed since last update.

MYSQLでWHERE句など条件を指定してmysqldumpする

Posted at

任意のレコードだけ手作業で別のDBへ移したいときとかに。

$ mysqldump --opt -u root -p データベース名 テーブル名 "-w where id=1" > dump.sql
# CREATE TABLEを書き込まない場合は-t,–no-create-infoオプション
18
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
20