简体   繁体   中英

Connect to OpenShift MySQL with MySQL Workbench

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

The problem was how I set up the tunnel. It should have been L3316 -> xxxx:3306 , where xxxx 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'@'abcd' (using password: YES)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM