This seems to be a common error, but for the life of me I can\'t figure this out.
I have a set of InnoDB user tables in MySQL that are tied together via foreign key;
I've faced this issue and the solution was making sure that all the data from the child field are matching the parent field
for example, you want to add foreign key inside (attendance) table to the column (employeeName)
where the parent is (employees) table, (employeeName) column
all the data in attendance.employeeName must be matching employee.employeeName