[英]Connect to OpenShift MySQL with MySQL Workbench
I'm trying to access MySQL from OpenShift using MySQL Workbench. 我正在尝试使用MySQL Workbench从OpenShift访问MySQL。 To do this I connected through SSH with Putty and created a SSH tunnel: L3316 -> localhost:3306
. 为此,我通过SSH与Putty连接并创建了SSH隧道: L3316 -> localhost:3306
。
When I setup the connection from MySQL Workbench to localhost:3316
and test the connection I get 当我设置从MySQL Workbench到localhost:3316
的连接并测试连接时,我得到了
Lost connection to MySQL server at 'reading initial communication packet, system error: 0 在读取初始通信数据包时,与MySQL服务器的连接断开,系统错误:0
The problem was how I set up the tunnel. 问题是我如何设置隧道。 It should have been L3316 -> xxxx:3306
, where xxxx
is the MySQL host. 应该是L3316 -> xxxx:3306
,其中xxxx
是MySQL主机。 You can see this by running rhc-list-ports
in the OpenShift SSH console and you'll get something like 您可以通过在OpenShift SSH控制台中运行rhc-list-ports
来看到此信息,并且会得到类似
mysql -> x.x.x.x:3306
It might worth to also check if the user has access to the database and can connect from a remote host, but then you will get 还可能值得检查用户是否有权访问数据库并可以从远程主机进行连接,但是随后您将获得
Access denied for user 'blahblah'@'abcd' (using password: YES) 用户'blahblah'@'abcd'的访问被拒绝(使用密码:是)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.