MySQL & MariaDB error 1822 ER_FK_NO_INDEX_PARENT
Error messageFailed to add the foreign key constraint. Missing index for constraint '…' in the referenced table '…'
Example from our test runs: Failed to add the foreign key constraint. Missing index for constraint 'c2_ibfk_1' in the referenced table 'p2' (8.0.46)
How the message changed between versions