CloudShark Support

Persistent Database Settings

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.

Before Upgrading to 2.3

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.

Copy your database.yml

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.

CloudShark 2.3 and later

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.

1. Stop CloudShark

First stop the CloudShark service from running.

sudo service cloudshark stop

2. Edit your database.yml file:

nano /var/www/cloudshark/shared/config/database.yml

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

3. Set a new MySQL password

The mysqladmin tool has a password command to change your password from the console.

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.

4. Restart CloudShark

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.

About CloudShark

CloudShark is made by QA Cafe, a technology company based in Portsmouth, NH. Our passion for packet captures has grown out of our other product CDRouter.

Get in touch via our Contact us page or by following us on your favorite service: