Search code examples
mysqlamazon-rdsamazon-aurora

RDS Aurora Mysql Cluster - ALTER TABLE - Lost connection to MySQL server during query


Whe I try to alter my table (700 GB in total), I got an error after 2 hours like "Lost connection to MySQL server during query"

My query looks like:

ALTER TABLE add column x ...

Note: There isn't a storage/size problem.

Solved with Amazon DMS.


Solution

  • Solved with using Amazon DMS.

    1. Created new table with new column
    2. Migrated data with DMS from existing table to new table with select insert into
    3. Deleted old table
    4. Renamed new table