やったこと
BLOB型やGEOMETRY型も含めたデータを移行する必要があったのでその時に使ったオプションです。
次やる時には絶対忘れそうなところなので、残しておこうかと。
オプション名 | 説明 |
---|---|
--hex-blob | バイナリカラムを 16 進変換表記法を使用してダンプ |
実際のコマンド
バックアップ作成
mysqldump -h ホスト名 -u ユーザ名 -p データベース名 --hex-blob > dump_data.sql
データ登録
mysql -h ホスト名 -u ユーザ名 -p データベース名 < dump_data.sql
参考:
mysqldumpでバックアップをする時につけるオプション
http://oinume.hatenablog.com/entry/wp/292