vagrant mysql 端口,无法使用HeidiSQL连接到Vagrant:“无法连接到'localhost'上的MySQL服务器”...

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:

faaef263eb022010d02e93c5c952cc1f.png

Below are my connection settings:

3096b2f7389f06097497b91ad3bd1869.png

33c69201ad0a9d0483acba5b7b41d18a.png

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

解决方案

This seems to be an issue with the version of HeidiSQL I was using. Upgrading to HeidiSQL 9.1 allowed me connect.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值