Bug 1023105 - change_mysql_password should reset the mysql password if it has been changed
change_mysql_password should reset the mysql password if it has been changed
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Paul Morie
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-24 11:46 EDT by Paul Morie
Modified: 2015-05-14 19:31 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:26:35 EST
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 Paul Morie 2013-10-24 11:46:48 EDT
We recently add a tool, li/misc/maintenance/bin/change_mysql_password , to reset the password if it has been changed.
Comment 2 chunchen 2013-10-25 02:44:29 EDT
The tool is failed to work for scaled app, but can work well for non-scaled app, please refer to the following results:

1. For scaled app
1) Create a scaled app with mysql
rhc app create crb19s ruby-1.9 mysql-5.1 -s --no-git
2) SSH into the instance and run the tool script
# ./change_mysql_password 526a0776db6aa2050600002e
--------------------------------------------------------------------------------

Resetting mysql password for 526a0776db6aa2050600002e


ERROR: not all necessary env files are present.

2. For non-scaled app
1) Create a non-scaled app with mysql
rhc app create cas00 jbossas-7 mysql-5.1 --no-git
2) SSH into the instance and modify the <APP_UUID>/mysql/env/OPENSHIFT_MYSQL_DB_PASSWORD
3) SSH into this app and run "mysql", the mysql db should not be connected.
rhc ssh cas00
4) SSH into the instance and run the tool script
# ./change_mysql_password 526a0722db6aa2050600000d
--------------------------------------------------------------------------------

Resetting mysql password for 526a0722db6aa2050600000d


Starting user procs
-------------------

Starting gear 526a0722db6aa2050600000d... [ OK ]

Backing up user's DB password and URL... Done.


Stopping user procs
-------------------

Stopping gear
Stopping gear 526a0722db6aa2050600000d... [ OK ]
Stopping user processes
.......... Done.


Starting mysqld in permissive mode
----------------------------------

Waiting for mysql to start.... Done.


Resetting the mysql password... Done.


Stopping user procs
-------------------

Stopping gear
Stopping gear 526a0722db6aa2050600000d... [ OK ]
Stopping user processes
.......... Done.


Starting user procs
-------------------

Starting gear 526a0722db6aa2050600000d... [ OK ]

Result
------
Mysql Password Update Successful
5) SSH into this app and run "mysql"
526a0722db6aa2050600000d]\> mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, 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>
Comment 3 Paul Morie 2013-10-25 14:06:10 EDT
This is designed to be used on the gear with mysql.  It will not work when run on the head gear of a scalable app.
Comment 4 chunchen 2013-10-27 22:57:30 EDT
Mark it as VERIFIED according to Comment 2 and Comment 3 .

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