Bug 974899 - phpmyadmin can not connect to mysql
phpmyadmin can not connect to mysql
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Vojtech Vitek
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-17 01:23 EDT by Lei Zhang
Modified: 2015-05-14 19:21 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:56:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lei Zhang 2013-06-17 01:23:21 EDT
Description of problem:
When access Connection URL of phpmyadmin, "phpMyAdmin - Error" displays. Error detail info: "#2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
The server is not responding (or the local server's socket is not correctly configured)."

Version-Release number of selected component (if applicable):
devenv_3368
rhc-1.10.1 build from devenv_3368

How reproducible:
always

Steps to Reproduce:
1. rhc app create -a zend5 -t zend-5.6  
2. rhc cartridge add  -a zend5 -c mysql-5.1 and rhc cartridge add  -a zend5 -c phpmyadmin-3.4 
3.

Actual results:
Error displays when access Connection URL(https://zend5-rayzhang.dev.rhcloud.com/phpmyadmin/) of phpmyadmin-3.4. 

Expected results:
Connection URL(https://zend5-rayzhang.dev.rhcloud.com/phpmyadmin/) of phpmyadmin-3.4 can be accessed. 

Additional info:
Comment 1 Lei Zhang 2013-06-17 01:54:51 EDT
After ssh into the app, mysql can be connected.
Comment 2 Vojtech Vitek 2013-06-18 15:28:05 EDT
I followed the steps to reproduce on curent production:

ZEND
rhc app create -a zend5 -t zend-5.6
rhc cartridge add  -a zend5 -c mysql-5.1
rhc cartridge add  -a zend5 -c phpmyadmin-3.4

PHP
rhc app create -a php5 -t php-5.3
rhc cartridge add  -a php5 -c mysql-5.1
rhc cartridge add  -a php5 -c phpmyadmin-3.4

..and in both cases the PHPMyAdmin is working correctly.
Comment 3 Vojtech Vitek 2013-06-18 16:25:10 EDT
Reproduced on current DEVENV.
Comment 4 Hiro Asari 2013-06-18 17:17:42 EDT
Verified with the devenv. phpMyAdmin is not picking up the config file. It is then defaulting to connect to 'localhost' via socket.
Comment 5 Vojtech Vitek 2013-06-18 18:05:58 EDT
This bug is v1->v2 regression.
Comment 6 Vojtech Vitek 2013-06-18 20:21:33 EDT
https://github.com/openshift/origin-server/pull/2893

This bug must be fixed in the following exact order:
1. Run phpmyadmin v2->v2 migration
2. Update phpmyadmin cartridge RPM on each node
Comment 7 Vojtech Vitek 2013-06-18 21:12:35 EDT
Explanation of the above:

All nodes where phpmyadmin v1 cartridge was ever installed have the
/etc/phpMyAdmin/config.inc.php file changed to the OpenShift-specific
configuration.

All "pure" v2 nodes doesn't have that OpenShift configuration but the
RHEL's default one instead. This is the cause of bug 974899.

We need to make sure that we're going to provide the user-space symlinks
in all the gears (/sandbox/phpMyAdmin/config.inc.php) prior to fixing
the /etc/phpMyAdmin/config.inc.php file by replacing it with a symlink
to sandbox, as we can't let it point to yet nonexistent gear paths.
Comment 8 Vojtech Vitek 2013-06-19 12:54:21 EDT
Alternative Pull Request without the /sandbox polydir concept:

https://github.com/openshift/origin-server/pull/2899
Comment 9 Vojtech Vitek 2013-06-19 16:50:25 EDT
Another Pull Request - the cartridge RPM makes local copy of phpMyAdmin to the cartridge /usr directory. And the RPM is not changing any file owned by root, finally.

https://github.com/openshift/origin-server/pull/2906
Comment 10 Vojtech Vitek 2013-06-19 17:33:14 EDT
The same as above but bundle the phpMyAdmin into the cartridge RPM:
https://github.com/openshift/origin-server/pull/2907
Comment 12 Lei Zhang 2013-06-20 22:40:25 EDT
Test on INT(devenv_3395), Connection URL of phpmyadmin can be accessed successfully and check the related file in devev instance,cartridges/openshift-origin-cartridge-phpmyadmin/openshift-origin-cartridge-phpmyadmin.spec and cartridges/openshift-origin-cartridge-phpmyadmin/versions/shared/phpMyAdmin/config.inc.php also were changed. so verified it.

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