0
votes

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.

1

1 Answers

1
votes

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