Bug 1023105 - change_mysql_password should reset the mysql password if it has been changed
Summary: change_mysql_password should reset the mysql password if it has been changed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Paul Morie
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 15:46 UTC by Paul Morie
Modified: 2015-05-14 23:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:26:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Morie 2013-10-24 15:46:48 UTC
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 06:44:29 UTC
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 18:06:10 UTC
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-28 02:57:30 UTC
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.