mysql-error-1025

What does mysql error 1025 (HY000): Error on rename of './foo' (errorno: 150) mean?

安稳与你 提交于 2019-11-26 03:36:44
问题 I tried this in mysql: mysql> alter table region drop column country_id; And got this: ERROR 1025 (HY000): Error on rename of \'./product/#sql-14ae_81\' to \'./product/region\' (errno: 150) Any ideas? Foreign key stuff? 回答1: You usually get this error if your tables use the InnoDB engine. In that case you would have to drop the foreign key, and then do the alter table and drop the column. But the tricky part is that you can't drop the foreign key using the column name, but instead you would