Red Hat Bugzilla – Bug 825077
mysql added to a scalable app is not accessible using the environment variables
Last modified: 2015-05-14 18:54:31 EDT
Description of problem:
Unable to access mysql using the host+port environment variables.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. See forum post https://openshift.redhat.com/community/forums/openshift/can-not-connect-to-mysql-in-application-node-0
Can't connect to mysql using the host+port.
Should be able to connect to mysql from all gears for that application.
Can't connect to mysql using the host+port -- should set those to dns+proxy-port via the connectors.
Fixed with commit bd3577d8cc92fc45994d99dd2a8676081397798d
The env. vars for a scalable app are now set correctly. So this means the same env variables can be used in both app "flavors" (scalable + non-scalable).
Verified it on devenv_1808.
MySQL 5.1 database added. Please make note of these credentials:
Root User: admin
Root Password: xzrlgvgGQ2nG
Database Name: php0
Connection URL: mysql://f0af2c09cb-domaintest0002.dev.rhcloud.com:35541/
MySQL gear-local connection URL: mysql://127.0.251.1:3306/
You can manage your new MySQL database by also embedding phpmyadmin-3.4.
[root@localhost home]# ssh firstname.lastname@example.org
[php0-domaintest0002.dev.rhcloud.com ~]\> mysql -h "f0af2c09cb-domaintest0002.dev.rhcloud.com" -P "35541"
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
| Database |
| information_schema |
| mysql |
| php0 |
3 rows in set (0.00 sec)