Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#Database

Implementing Ghost Migrations for Large-Scale MySQL Table Refactoring

Customize the variables below to instantly engineer your prompt.

Required Variables

ghost-migrations-mysql-automation.txt
Act as a Principal MySQL Architect. Provide a flawless, production-ready implementation guide for deploying `gh-ost` (GitHub's Online Schema Change tool) to safely execute a complex table refactor on a massive, highly active [TABLE_SIZE] (e.g., 2TB+) InnoDB table without locking the database. You must perfectly integrate this bash execution logic into an automated [CI_CD_RUNNER] workflow. Mathematically define the specific throttling parameters ([GH_OST_THROTTLE_PARAMS]) required to dynamically pause the migration based on active replica lag metrics and master thread loads, ensuring 100% database availability. Explicitly detail the atomic `RENAME TABLE` cut-over strategy, how to automate the eventual cleanup of the `_gho` and `_del` ghost tables post-migration, and provide an instant abort/contingency plan if the cut-over phase encounters a severe lock timeout.

Example Text Output

"A YAML configuration for a GitLab CI job that executes gh-ost with dynamic load-based throttling, ensuring the 1TB table is refactored without locking the production database."

More Cloud & DevOps Prompts

View all →

Frequently Asked Questions

What is the "Implementing Ghost Migrations for Large-Scale MySQL Table Refactoring" prompt used for?

A YAML configuration for a GitLab CI job that executes gh-ost with dynamic load-based throttling, ensuring the 1TB table is refactored without locking the production database.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.