Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > ServerTemplates > Archive > Pre-11H1 > MySQL-S3 > Database Manager for MySQL-S3 Runbook > MySQL-S3 Recipes > Reinitialize Master-DB contents

Reinitialize Master-DB contents

There are several different ways to manually initialize the contents of a MySQL DB.  This document describes a simple way of accomplishing this task.   Experienced DBA's can choose their preferred method to accomplish the same task.

Instructions

  1. Connect to the active master DB instance. How?
     - Access the running instances page (Manage -> Servers)
     - Click on the "console" icon ssh_console_icon.gif to open a direct Unix SSH console to the running instance
  2. Download the initial DB contents into the local disk (i.e., /mnt/ ). How?
     - Perhaps from S3 (e.g., set the environment variables and use s3cmd)
     - ...or perhaps from another instance (e.g., using scp or rsync)
  3. Install the downloaded contents into the MySQL server. How?
     - By creating the schema and applying the MySQL dump file (if that's the format of the download)
     - ...or perhaps by replacing the base directory if the downloaded contents are in binary format.

What feedback to expect

After this recipe is complete, the master DB instance should be serving the contents of the downloaded DB file. An easy way to confirm it is to locally connect to the mysql server and show the list of databases/schemas it is serving. For example: echo "show databases;" | mysql -u root. You should be able to find the name of the imported DB in the list of database names.

You must to post a comment.
Last modified
21:34, 16 May 2013

Tags

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.