I'm using Scotch Box, an awesome Vagrant LAMP stack.
I was able to setup everything on my Macbook in < 5 minutes, but I'm having issues getting it working on my Windows machine.
When I try to connect to the vagrant database using the HeidiSQL client, I receive the following error:
Below are my connection settings:
I've also tried port 22 on the SSH Tunnel tab, and I've double checked my passwords:
MySQL: root/root
Vagrant: vagrant/vagrant
I've confirmed that the MySQL service is running, and I'm able to connect to MySQL via the command line when I ssh into the Vagrant instance.
Any idea why this isn't working out-of-the-box for me?
Thanks!
Edit:
Here's the Vagrantfile
if it helps:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
end
One thing I overlooked is that "local port" under the SSH Tunnel tab is also required. To wrap it all together, there's three key ports to set.
If your Vagrantfile looks kind of like this:
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 3306, host: 3310
config.vm.network "private_network", ip: "192.168.100.11"
end
and Vagrant auto-forwards the SSH port (22) to, say 2222 (you can check this by vagrant ssh-config
, then the HeidiSQL config should be as follows:
As new Vagrant versions use a custom-generated SSH key, you will need that instead of the vagrant/vagrant user/pw combination. The keys can be found in project location\.vagrant\machines\default\virtualbox
.
This is as of HeidiSQL 9.4.0.5130 (64 Bit) on Windows 10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With