How to import database into vagrant mysql?
10,419
You do not have D:/xampp/mysql/bin/db.sql
from your vagrant VM
Place the file
db.sql
in the same folder where you have the Vagrantfilevagrant ssh
as you normally do to get into the VMrun the following command to import the db
$ mysql -u root -p mydb < /vagrant/db.sql
The /vagrant
folder is a default shared folder in the VM.
Author by
David Jaw Hpan
Hey i am david ,nice to meet u all programmer. My works https://learn4mm.herokuapp.com [Learning site] https://davitheme.herokuapp.com [One page design]
Updated on June 15, 2022Comments
-
David Jaw Hpan almost 2 years
In window cmd ,I usually do like this and it is working
C:\Users\davi> mysql -u root -p mydb < D:/xampp/mysql/bin/db.sql
I am new in vagrant , this is what I do in vagrant ssh
[vagrant@localhost bs]$ mysql -u root -p mydb < D:/xampp/mysql/bin/db.sql
But I got this error
-bash: D:/xampp/mysql/bin/db.sql: ??????????????????????
Is there anyway to import correctly ?