MariaDBにダンプファイルをインポートする
1.仮想環境にダンプファイルを送る
まずは仮想環境にファイルを送ります。
1-1.MACユーザだったら、、、
VagrantのSSHの設定ファイルを書き出す
$ vagrant ssh-config > ssh.config
書き出した設定ファイルを使って転送する
$ scp -F ssh.config dump.sql vagrant@default:~/
こんなかんじですかね!
1-2.Winだったら、
WinSCPとかでDragAndDropしちゃう^^
2.sourceコマンドでダンプを入れる
mysql -u ユーザ名 -p
パスワード
↓
EX)
mysql -u root -p
root
ログインできたら、、、
use DB名
Ex)↓
use test_db
Database changed←と出力される
source ダンプファイルを置いたパス
EX)↓
source /home/vagrant/dump.sql
以上となります!
お疲れ様でした!