Tag Archives: drop

mysql ERROR 1025 (HY000): Error on rename of

Today, when I was working on mysql, I wanted to drop the primary key, but there was an ERROR: mysql ERROR 1025 (HY000): ERROR on rename of… After searching the data, the solution is to remove the auto_increment if the primary key is auto_increment before dropping xx. If the primary key also has a foreign key constraint, the foreign key constraint is removed first. Once all of these additional constraints are removed, the primary key can be dropped safely.