(1) Set foreign key constraints
alter table table name add foreign key (field name) references table name (field name)
Among them, the type and length of the two field names must be the same. If you can't set it, you can delete the record and try again.
(2) Cancel the foreign key constraint (set in the phpmyadmin table relationship)
select restrict
Constraint name must be empty