gpt4 book ai didi

mysql - 将数据库 GUI 连接到 Vagrant (PuPHPet)

转载 作者:可可西里 更新时间:2023-11-01 08:15:59 26 4
gpt4 key购买 nike

我昨天使用 PuPHPet 设置了 Vagrant,一切似乎都运行良好。我使用 Querious 连接到 mysql 数据库。但是,我没有保存我用来连接的配置,今天早上做了 vagrant up 之后,无论我做什么,我似乎都无法连接。

我正在尝试:

  • SSH 主机:192.168.56.101
  • SSH 用户:vagrant
  • SSH 通行证:vagrant
  • SSH key :.../puphpet/files/dot/ssh/id_rsa
  • SSH 端口 2222
  • 主机:127.0.0.1
  • 用户:用户名
  • 密码:密码
  • 端口:3306

如果我尝试这些设置,我会得到

> SSH failed to connect to the server 192.168.56.101 on port 2222
>
> SSH connection failed for an unknown reason. SSH shutdown.
>
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 192.168.56.101 [192.168.56.101] port 2222.
debug1: connect to address 192.168.56.101 port 2222: Operation timed out
ssh: connect to host 192.168.56.101 port 2222: Operation timed out

如果我将 SSH 主机更改为 127.0.0.1,我会得到一个不同的错误。远程主机的 SSH key 验证失败。

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /Users/db/Dev/c2t-vagrant/puphpet/files/dot/ssh/id_rsa type 1
debug1: identity file /Users/db/Dev/c2t-vagrant/puphpet/files/dot/ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 9c:3a:9a:d0:22:8c:19:05:f2:26:54:d9:62:9e:ba:e4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
9c:3a:9a:d0:22:8c:19:05:f2:26:54:d9:62:9e:ba:e4.
Please contact your system administrator.
Add correct host key in /Users/db/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/db/.ssh/known_hosts:2
RSA host key for [127.0.0.1]:2222 has changed and you have requested strict checking.
Host key verification failed.

我执行了“vagrant ssh”并转到了 ~/.ssh,其中包含三个文件、授权 key 、id_rsa 和 id_rsa.pub。 id_rsa 与我选择的 key 匹配,但我没有立即认出 authorized_keys 文件中的内容。

我还尝试更改 php.ini 中的绑定(bind)地址 Connect to MySQL on Vagrant instance with Sequel Pro ,但我没有任何运气/不明白那在做什么。

我显然是盲目飞行,是 Vagrant 的新手并且对 SSH 的掌握非常不完整。接下来我应该尝试什么类型的事情才能让它发挥作用?

谢谢。

最佳答案

尝试使用:

vagrant ssh-config

找出连接所需的所有配置。查看此链接: Vagrant and Mysql Workbench

关于mysql - 将数据库 GUI 连接到 Vagrant (PuPHPet),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28179040/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com