[英]MySQL Workbench Error: Couldn't connect the SSH Tunnel
I am trying to establish a connection to a database instance in AWS EC2.我正在尝试与 AWS EC2 中的数据库实例建立连接。 I've spent hours looking at all the posts that exist on Stack Overflow and many other places related to this but nothing works for me.
我花了几个小时查看 Stack Overflow 上存在的所有帖子以及与此相关的许多其他地方,但对我没有任何用处。
I am able to use my.pem key to establish a connection successfully through PuTTY on my Windows 10 machine.我可以使用 my.pem 密钥在我的 Windows 10 机器上通过 PuTTY 成功建立连接。 I also am able to connect and use the database in dbForge Studio and DataGrip but I get this error when I use MySQL Workbench (I am trying to transition to the free software).
我也能够在 dbForge Studio 和 DataGrip 中连接和使用数据库,但是当我使用 MySQL Workbench(我正在尝试过渡到免费软件)时出现此错误。 I think this is something related to the key.
我认为这是与关键有关的事情。 Is there anything else required to do with the key after I downloaded it from AWS?
从 AWS 下载后,是否还需要对密钥进行任何其他处理? Or does MySQL Workbench require anything different than dbForge or DataGrip?
或者 MySQL Workbench 需要与 dbForge 或 DataGrip 不同的东西吗?
Do I need to change the key format or add it to /.ssh folder or something along those lines?我是否需要更改密钥格式或将其添加到 /.ssh 文件夹或类似的内容? These are the tips I got from other answers but unfortunately, nothing worked for me.
这些是我从其他答案中得到的提示,但不幸的是,对我没有任何帮助。 Any insights would be appreciated.
任何见解将不胜感激。
Can you please confirm the MYSQL hostname that you provided is local IP address 127.0.0.1 and the port number 3306. Because you're connecting over ssh and accessing the localhost inside the machine.您能否确认您提供的 MYSQL 主机名是本地 IP 地址 127.0.0.1 和端口号 3306。因为您通过 ssh 连接并访问机器内部的本地主机。 And make sure to give proper read permission for your SSH pem file like
chmod 400 my_test_key.pem
.并确保为您的 SSH pem 文件提供适当的读取权限,例如
chmod 400 my_test_key.pem
。 For your reference here I'm attaching a read.为了您的参考,我附上了一份阅读材料。
https://towardsdatascience.com/running-mysql-databases-on-aws-ec2-a-tutorial-for-beginners-4301faa0c247 https://towardsdatascience.com/running-mysql-databases-on-aws-ec2-a-tutorial-for-beginners-4301faa0c247
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.