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.

Tag page
You must login to post a comment.