gh-ost

Triggerless online schema migration solution for MySQL

brewmacoslinux
Try with needOr install directly
Source

About

Triggerless online schema migration solution for MySQL

Commands

gh-ost

Examples

Migrate a table by adding a new column$ gh-ost --user=root --password=secret --host=localhost --database=mydb --table=users --alter='ADD COLUMN age INT' --execute
Run a dry-run migration to validate changes without execution$ gh-ost --user=root --password=secret --host=localhost --database=mydb --table=users --alter='MODIFY COLUMN email VARCHAR(255)' --dry-run
Migrate with a specific replica host for slave lag monitoring$ gh-ost --user=root --password=secret --host=localhost --database=mydb --table=users --alter='ADD INDEX idx_email(email)' --execute --assume-rbr --initially-drop-ghost-table