Download Instructions - MySQL Capture and Replay Tool

Follow the instructions below to download the My Capture and Replay tool to test database performance. This tool is a web-based GUI that can be run from any modern web browser.

Step-by-Step Instructions

Initial Steps

  1. Decide where the MySQL Capture and Replay tool application will be run

    Option 1: Run the web application tool locally.

    Option 2: Run the tool on an EC2 Instance. Follow these steps:

    1. Add a Security Group to expose port 80. This allows web traffic to access the web browser after all configuration is complete.

    2. SSH into your EC2 instance and complete the rest of the instructions on the EC2 instance.

Install Python 3

View the installation instructions for your specific work environment at: https://docs.python.org/3/using/index.htmlarrow-up-right

circle-info

Make sure to download Python 3 and ensure that the command "python3" in a terminal on your environment will evaluate to Python 3 , not version 2.

Install Node and NPM

Similar to Python 3 in the section above, view the installation instructions for Node and NPM for your specific work environment at: https://nodejs.org/en/download/arrow-up-right

Git Clone (Get the code for My Capture and Replay Tool)

  1. Open a terminal or bash shell either locally or on your EC2 instance, depending on which option you chose earlier.

  2. Navigate to a desired file folder location to install the code for the tool.

  3. Run the following command to download the code:

circle-info

Remember the location where you choose to download the code. You will have to access this location in the future.

Install Code Dependencies

  1. Install the necessary Python dependencies by running the following code:

2. Change directories into the "static" directory of the code folder:

3. Install the necessary front-end dependencies by running the following code:

circle-info

The above step may take a few minutes to complete.

Set Up an AWS S3 Bucket

The tool requires an AWS S3 Bucket to store the database performance analytics when comparing various MySQL Databases.

Option 1: Configure an AWS S3 Bucket. https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.htmlarrow-up-right

Option 2: Use an existing S3 Bucket. Make sure that the bucket is empty if you use this option.

circle-info

Remember the name of the S3 Bucket you create. It will added to a "utilitydb.ini" file in the following step.

1. Move into the server directory of the code:

2. Create a "utilitydb.ini" file. Use a text editor of your choice. The command below creates the file with vim:

3. The contents of the file should contain the name of the S3 Bucket created earlier in the instructions.

4. Save the "utilitydb.ini" file.

Configure AWS Authorization

Option 1 (Recommended): If you are running the code on an EC2 Instance, follow these steps to set up IAM roles.

  1. Follow the instructions at this link to set up an IAM role for your EC2 instance that fits your organization's guidelines: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.htmlarrow-up-right

  2. Please note the following Policies are needed for the IAM Role:

    - AmazonRDSEnhancedMonitoringRole

    - AmazonRDSReadOnlyAccess

    - CloudWatchReadOnlyAccess

    - AmazonS3FullAccess

3. Move into the "server" directory of the code:

4. Create a "config.ini" file. Use a text editor of your choice. The command below creates the file with vim:

5. The contents of the file should contain the region you wish to use.

6. Save the "config.ini" file.

Option 2: If you are running the code locally (or on an EC2 Instance), follow these steps to configure AWS Access Keys

  1. Create AWS Access Keys so that the MySQL Capture and Replay Tool can access any databases associated with your account. https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.htmlarrow-up-right

circle-info

Make sure to write down the public and private key after they are created. Do not share them publicly with anyone.

2. Move into the "server" directory of the code:

3. Create a "config.ini" file. Use a text editor of your choice. The command below creates the file with vim:

4. The contents of the file should contain your public and private key that you just created.

5. Save the "config.ini" file.

Start the Tool

  1. Start the tool. Navigate to the correct directory of the code and start the python server.

circle-info

Note: The specified login-username and login-password are created by you and will be used in step 3.

2. Access the tool from any modern web browser (e.g. Google Chrome): http://localhost:5000/arrow-up-right

3. Use the above command line arguments to log in at the splash login screen.

4. Enjoy!

Accessing/Configuring MySQL RDS Instances

After your MySQL RDS instance is instantiated, for MyCRT to work, the following parameters must be enabled in the Parameter Group for the RDS:

  • "general_log" must be set to "1"

  • "log_output" must be set to "TABLE"

Last updated