Tag Archives: mismatch

MySql – Error while dropping a foreign key constraint

Came across this error while trying to drop a foreign key constraint in a MySql database.

mysql> alter table qrtz_triggers drop foreign key qrtz_triggers_job_name_fkey; 
ERROR 1025 (HY000): Error on rename of '.\motechquartz\qrtz_triggers' to '.\motechquartz\#sql2-444-8' (errno: 152)

To figure out the actual problem, execute the following line:

mysql> show create table qrtz_triggers;

Most probably, the error would be because of either a mismatch in the constraint name or a mismatch in the casing of the constraint name.