简体   繁体   中英

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

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.

Try specifying the host separately.

Eg 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

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