vagrant mysql root,使用vagrant导入数据库mysql。无此文件或目录

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\

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值