We recently add a tool, li/misc/maintenance/bin/change_mysql_password , to reset the password if it has been changed.
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>
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.
Mark it as VERIFIED according to Comment 2 and Comment 3 .