Starting in CloudShark 2.3 you will reliably be able to change the default password on CloudShark’s MySQL database, and have those settings remain after you upgrade.
If you have changed the default MySQL password, or made any other changes to the database configuration, those changes will have been reflected in this file.
Before you upgrade to 2.3 you must copy those changes to a new location. Once you have copied them, installing CloudShark 2.3 and all subsequent release will not overwrite them.
cd /var/www/cloudshark/current cp config/database.yml /var/www/cloudshark/shared/config/database.yml
You should then upgrade to CloudShark 2.3 or later to use the settings in the “shared” directory.
If you would like to change the default MySQL password for your CloudShark system, you must do so in two places; the CloudShark configuration file, and the MySQL database itself.
First stop the CloudShark service from running.
sudo service cloudshark stop
Only the ‘production’ section matters. You should set your new password there and ignore the rest of the file. The current default password will be shown in the file.
--- production: &defaults adapter: mysql database: cloudshark user: root password: NEWPASSWORD development: <<: *defaults test: <<: *defaults database: cloudshark_test rake: <<: *defaults
mysqladmin tool has a
password command to change your password from the
mysqladmin -u root -p password NEWPASSWORD
This command will prompt you for the OLDPASSWORD (from the original database.yml file) and then set the NEWPASSWORD you have chosen.
Once you have updated both the config file, and MySQL itself, you can restart CloudShark.
sudo service cloudshark start
Navigate to your homepage and verify you can access CloudShark.