# MySQL Migrations

DevFeed: [MySQL Migrations](<https://devfeed.tech/articles/mysql-migrations-35617.md>)

Original publisher: [Read original article](<https://zolmeister.com/2016/08/mysql-migrations.html>)

Author: Zoli Kahan

Published: 2016-08-27T05:00:00Z

Content type: tutorial

Language: en

Sources: [Zolmeister](<https://devfeed.tech/sources/zolmeister.md>)

Topics: [MySQL](<https://devfeed.tech/topics/mysql.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Database](<https://devfeed.tech/topics/database.md>), [Docker](<https://devfeed.tech/topics/docker.md>)

Tags: [alter](<https://devfeed.tech/tags/alter.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [database](<https://devfeed.tech/tags/database.md>), [docker](<https://devfeed.tech/tags/docker.md>), [downtime](<https://devfeed.tech/tags/downtime.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [mysql](<https://devfeed.tech/tags/mysql.md>)

## AI overview

This article describes migrating 17 million rows in MySQL without downtime while a table continues receiving reads and writes. It explains using Large Hadron Migrator to copy the table and track new writes with triggers, adjusting migration speed to avoid write timeouts, and running the process in a Docker container. The migration ultimately took more than 20 hours, and cleanup was manual if problems occurred.

## Source excerpt

MySQL Migrations Migrating 17M rows with no downtime - Isotope Scenario: 17M rows in a table, constant writes/reads, slave/master setup. If you try to run an ALTER TABLE (especially on older versions of MySQL), most operations will lock the table for writes for the entire run-time of the query. To avoid this, we need to incrementally update the table, incorporating write changes as they arrive. Our solution was to use the Large Hadron Migrator, built and open-sourced by SoundCloud.