Bug 825077 - mysql added to a scalable app is not accessible using the environment variables
Summary: mysql added to a scalable app is not accessible using the environment variables
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-25 03:21 UTC by Ram Ranganathan
Modified: 2015-05-14 22:54 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:58:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ram Ranganathan 2012-05-25 03:21:18 UTC
Description of problem:
Unable to access mysql using the host+port environment variables. 

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


How reproducible:
Always

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 21:25:09 UTC
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 06:43:44 UTC
Verified it on devenv_1808.


Output:

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 78402e953222489698a31b85b4af207f.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
owners.

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.