Modify MySQL foreign key related column without dropping foreign key relation I need to modify a foreign key related column. When I tried to alter it I got "Error on rename of 'x' to 'y' (errno: 150)" error. So I googled and found foreign key relation is the 'villain'. I dropped the foreign key relation, altered the column and created foreign key relation.

Is there any way to alter foreign key related columns without dropping the relation?
Yeah i think you have a SQL command like : 

SET foreign_key_checks = 0;  


which should be session based. Then you set =1 once you're done.