我在一个名为test_db-master的文件夹中有一个示例数据库。我需要确保zip文件在我的vm的/ vagrant目录。我相信这意味着我必须保存这个db文件夹在我从中运行vagrant up和ssh命令的目录,我已经这样做了。
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.
得到vagrant(mac上的虚拟框),我ssh进入vagrant后,我需要运行以下命令:
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我已经看完了,找不到解决方案。显然,我应该看到雇员数据库一旦我登录到mysql,我不。这是我第一次深入到VMs,mysql,apache等的世界(使用LAMP)。任何帮助将不胜感激。
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.
推荐答案很可能是SQL文件的完整路径是必需的,可以在命令中指定 mysql -u root -p < \Path\To\File\employees.sql
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
或确保您在运行命令。
cd \Path \To\File\
更多推荐
使用vagrant导入数据库mysql。无此文件或目录
发布评论