I've got a sample database in a folder called test_db-master. I'm required to "make sure the zip file is in the /vagrant directory of my vm". I believe that means that I have to save this db folder in the directory from which I run the vagrant up and ssh commands and I've done that.
I've got vagrant (virtual box on mac) and after I ssh into vagrant I'm required to run the following command:
mysql -u root -p < employees.sql
After I run the above command, terminal gives me this message:
-bash: employees.sql: No such file or directory
I have looked all over and can't find a solution. Apparently I'm supposed to see the employees database once I login to mysql and I don't. This is my first time delving into the world of VMs, mysql, apache etc (Working with LAMP). Any help will be appreciated.
解决方案
It would most likely be that the full path to the SQL file is required, either specify it in the command
mysql -u root -p < \Path\To\File\employees.sql
or make sure you are inside the folder containing the file when running the command.
cd \Path\To\File\