Support the ongoing development of Laravel.io →
Configuration

Hope this is the right place, didn't find a place for homestead stuff.

I'm trying to pass a simple command to the homestead vagrant machine.

vagrant ssh -c "mysql -u homestead -psecret -e'CREATE DATABASE testing;'"

The db doesn't get created. Instead I just get 'logged in' to the homestead vagrant machine via ssh.

When I run the command inside the vagrant machine it works as expected.

I've also tried with:

  • single quotes around command
  • --command instead of shorthand -c

I'm going to distribute my script and it's going to integrate with Homestead, so can't really tweak the vagrant configuration.

Any ideas what's going on?

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

JoshMoreno joshmoreno Joined 12 Nov 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.