简体   繁体   English

从主机连接到Homestead MySQL

[英]Connect to homestead mysql from host machine

I'm trying to connect to a MySQL server on my Homestead (vagrant) setup. 我正在尝试在Homestead(无用)设置上连接到MySQL服务器。 I don't have any problems SSH-ing inside it, and I can use it's command line mysql without problems. 我在SSH内没有任何问题,可以在没有问题的情况下使用它的命令行mysql。 Note that I'd like to connect to it from my host machine using MySQL Workbench on Ubuntu 14.10 请注意,我想在Ubuntu 14.10上使用MySQL Workbench从主机连接到它

Here are my settings: 这是我的设置:

在此处输入图片说明

As you can see I've added my private ssh key. 如您所见,我已经添加了我的私钥。 I don't think there is an ssh password set. 我认为没有设置ssh密码。 The mysql username and passwords though are 100% correct. mysql的用户名和密码虽然是100%正确的。

What am i doing wrong? 我究竟做错了什么?

This is a little bit old question but I had problem with connection and maybe somebody else will have it. 这是一个有点老的问题,但是我在连接方面遇到了问题,也许其他人会遇到。 These are working parameters for connection: 这些是用于连接的工作参数:

在此处输入图片说明

  • Homestead version: laravel/homestead (virtualbox, 2.1.0) Homestead版本:laravel / homestead(virtualbox,2.1.0)
  • Vagrant version: 1.9.3 流浪版本:1.9.3

There is no need to SSH; 无需SSH; check your homestead.yaml file for your ip, default = 192.168.10.10 - then just connect straight using the default username/password: 'homestead' and 'secret' 检查您的homestead.yaml文件中的IP,默认= 192.168.10.10-然后使用默认的用户名/密码直接连接:“ homestead”和“ secret”

You are trying to create an SSH tunnel to your local machine? 您是否正在尝试创建到本地计算机的SSH隧道? That doesn't make sense. 那没有道理。 You wouldn't need SSH at all for that. 您根本不需要SSH。 I rather assume you have a remote server to which you want to connect, right? 我想假设您有一台要连接的远程服务器,对吗? So use that IP address instead for SSH. 因此,请使用该IP地址代替SSH。 If the MySQL server is on the same box as the SSH remote point then the loopback address is ok, otherwise change the value to the IP address of the remote MySQL server. 如果MySQL服务器与SSH远程点位于同一盒子上,则回送地址正常,否则将其值更改为远程MySQL服务器的IP地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM