简体   繁体   English

MySQL 工作台错误:无法连接 SSH 隧道

[英]MySQL Workbench Error: Couldn't connect the SSH Tunnel

Full Error:完整错误: 在此处输入图像描述

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.

相关问题 RDS MySQL 通过外部 SSH 隧道连接 - RDS MySQL Connection via external SSH tunnel 通过SSH隧道连接AWS DocumentDb in.Net Core - Connect to AWS DocumentDb in .Net Core through SSH Tunnel 将 Workbench 连接到安装在 Windows AWS 上的 MySQL - Connect Workbench to MySQL installed on Windows AWS 使用 ssh 隧道从 Java jdbc 连接到 aws 远程 Postgres,面临连接超时,而 JsCH session.connect() 运行成功 - Connect to aws remote Postgres from Java jdbc with ssh tunnel, Facing connection timeout, while JsCH session.connect() ran successful 无法从 MySQL Workbench 连接到 RDS MySQL 数据库 - Unable to connect to RDS MySQL database from MySQL Workbench 在 Jupyter Notebook 上通过 SSH 连接 AWS 上的 MySQL - Connect MySQL on AWS via SSH on Jupyter Notebook 如何通过 SSH 隧道从 Excel VBA 连接到 Amazon RDS 上的 PostgreSQL? - How to connect to PostgreSQL on Amazon RDS from Excel VBA via SSH tunnel? 如何使用 mysql workbench 连接到私有 rds in.network 负载均衡器和 ecs - How to connect to private rds in network load balancer and ecs with mysql workbench 通过 SSH 隧道连接 DBeaver - DBeaver connection via SSH tunnel 如何在 AWS ssh 环境中运行 mysql (django.db.utils.OperationalError: (2003, "Can't connect to MySQL server) - How to run mysql in AWS ssh environment (django.db.utils.OperationalError: (2003, "Can't connect to MySQL server)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM