How to speed up foreign key creation in MySQL for large tables?
A FOREIGN KEY:

Includes an index, which may help performance during JOINs, sometimes significantly.
Includes a constraint that guarantees the existence of a matching row in another table.

Some cases of adding an index require copying the table over.  Hence the &quot;copy&quot;.  Apparently, you have such a situation.  For further discussion, please provide SHOW CREATE TABLE before the command, and the ALTER TABLE that was adding the FK.