Bug 825077 - mysql added to a scalable app is not accessible using the environment variables
mysql added to a scalable app is not accessible using the environment variables
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ram Ranganathan
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-05-24 23:21 EDT by Ram Ranganathan
Modified: 2015-05-14 18:54 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-08 13:58:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ram Ranganathan 2012-05-24 23:21:18 EDT
Description of problem:
Unable to access mysql using the host+port environment variables. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See forum post https://openshift.redhat.com/community/forums/openshift/can-not-connect-to-mysql-in-application-node-0

Actual results:
Can't connect to mysql using the host+port.

Expected results:
Should be able to connect to mysql from all gears for that application.

Additional info:
Can't connect to mysql using the host+port -- should set those to dns+proxy-port via the connectors.
Comment 1 Ram Ranganathan 2012-05-29 17:25:09 EDT
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).
Comment 2 yquan 2012-05-30 02:43:44 EDT
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://

You can manage your new MySQL database by also embedding phpmyadmin-3.4.

[root@localhost home]# ssh 78402e953222489698a31b85b4af207f@php0-domaintest0002.dev.rhcloud.com

[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)

Note You need to log in before you can comment on or make changes to this bug.