MySQL requires indexes on foreign keys and referenced keys so that
foreign key checks can be fast and not require a table scan.

You can create such an index using the following statement:

CREATE INDEX id_index ON Ingredienti (IngredienteID, UnitaDiMisura);

However, you should be careful as to what this FK really implements. Since the composite key (IngredienteID, UnitaDiMisura) is not the PK of table Ingredienti, nor is it a unique index, you might end up in multiple references to Ingredienti table for the (IngredienteID, UnitaDiMisura) value.