0
votes

I'm trying to access MySQL from OpenShift using MySQL Workbench. To do this I connected through SSH with Putty and created a SSH tunnel: L3316 -> localhost:3306.

When I setup the connection from MySQL Workbench to localhost:3316 and test the connection I get

Lost connection to MySQL server at 'reading initial communication packet, system error: 0

1

1 Answers

1
votes

The problem was how I set up the tunnel. It should have been L3316 -> x.x.x.x:3306, where x.x.x.x is the MySQL host. You can see this by running rhc-list-ports in the OpenShift SSH console and you'll get something like

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'@'a.b.c.d' (using password: YES)