我无法使用PhpStorm在流浪机中创建到MySQL数据库的连接。连接到PhpStorm的流浪机上的MySQL数据库
我的设置是:
DATABASE标签:
- 主机:127.0.0.1
- 端口:3306
- 用户:根
- 密码:root_passsword
SSH/SSL选项卡:
- 代理主机:192.168.56.102
- Por T:22
- 代理用户:流浪汉
- 代理密码:流浪汉
有人能帮助我吗?谢谢
我无法使用PhpStorm在流浪机中创建到MySQL数据库的连接。连接到PhpStorm的流浪机上的MySQL数据库
我的设置是:
DATABASE标签:
- 主机:127.0.0.1
- 端口:3306
- 用户:根
- 密码:root_passsword
SSH/SSL选项卡:
- 代理主机:192.168.56.102
- Por T:22
- 代理用户:流浪汉
- 代理密码:流浪汉
有人能帮助我吗?谢谢
在SSH/SSL选项卡中,选择Auth type Key pair
,然后将路径复制到IdentityFile
中的私钥文件define。例如C:/virtualM/deb56/puphpet/files/dot/ssh/id_rsa
$vagrant up
$vagrant ssh-config
Host local
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile "C:/virtualM/deb56/puphpet/files/dot/ssh/id_rsa"
IdentityFile "C:/Users/User/.vagrant.d/insecure_private_key"
IdentitiesOnly yes
LogLevel FATAL
谢谢,'vagrant ssh-config'命令帮助我找到在phpStorm中使用哪个键。 – mfink
下面是关于这个问题的一个非常好的文章:
即:
vagrant ssh-config
命令从终端cd ~/path/to/your/project
或者只是访问我在顶部发布的URL。
从[本教程为流浪汉](https://confluence.jetbrains.com/display/PhpStorm/Working+with+Advanced+Vagrant+features+in+PhpStorm#WorkingwithAdvancedVagrantfeaturesinPhpStorm-1.2.Provideconnectioninformation) - 请尝试'您的SSH/SSL选项卡中的127.0.0.1'和'2222'。 – LazyOne
这篇文章对我很有帮助(特别是SSH部分,没有意识到我必须这样做)。 – Jimbo
谢谢@LazyOne!那个链接对我来说至关重要! – Ryan