问题描述
我正在使用 Scotch Box ,这是一款很棒的Vagrant LAMP堆栈.
I'm using Scotch Box, an awesome Vagrant LAMP stack.
我能够在< 5分钟,但是在Windows计算机上无法正常工作.
I was able to setup everything on my Macbook in < 5 minutes, but I'm having issues getting it working on my Windows machine.
当我尝试使用HeidiSQL客户端连接到无业游民的数据库时,出现以下错误:
When I try to connect to the vagrant database using the HeidiSQL client, I receive the following error:
以下是我的连接设置:
我还尝试了"SSH隧道"选项卡上的端口22,并仔细检查了密码:
I've also tried port 22 on the SSH Tunnel tab, and I've double checked my passwords:
MySQL: root/root
MySQL: root/root
无业游民:无业游民/无业游民
我已经确认MySQL服务正在运行,并且在ssh进入Vagrant实例时可以通过命令行连接到MySQL.
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?
谢谢!
这是Vagrantfile
,如果有帮助的话:
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
推荐答案
这似乎与我使用的HeidiSQL版本有关.升级到HeidiSQL 9.1后,我可以进行连接.
This seems to be an issue with the version of HeidiSQL I was using. Upgrading to HeidiSQL 9.1 allowed me connect.
这篇关于无法使用HeidiSQL连接到Vagrant:“无法连接到'localhost'上的MySQL服务器"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!