0

openshift scaled app with port forward - Unable to access mysql on localhost.

I have a simple php scaled app, I was able to setup the port forwarding for myapp. I can see that the 127.0.0.1:37731 is pointing to the openshift mysql gear.

But when I try to access mysql on command line or using mysql workbench, I am getting a "Connected to MySQL at 127.0.0.1:37731 with user adminXXXXX", connection parameters are incorrect error.

I am ubuntu. "adminXXXXX:@127.0.0.1:37731:" is the connection string when I copy it from the workbench.

Samuel
  • 83
  • 5
  • 1
    see: http://stackoverflow.com/questions/15921169/how-to-connect-to-the-database-in-openshift-application – ptrk Jan 11 '15 at 18:01

1 Answers1

1

Try specifying the host separately.

E.g. after port forwarding, I entered

mysql --host=127.0.0.1:40793

and got

ERROR 2005 (HY000): Unknown MySQL server host '127.0.0.1:40793'

but this worked:

mysql --host=127.0.0.1 --port=40793
oks
  • 304
  • 2
  • 13