#这可能是MySQL在InnoDB中设置了foreign key关联,造成无法更新或删除数据。可以通过设置FOREIGN_KEY_CHECKS变量来避免这种情况。
mysql>SET FOREIGN_KEY_CHECKS = 0;
Query OK, 0 rows affected (0.02 sec)
mysql> delete from repositories where repo_name = "watch/sinawatch_agent_update";
Query OK, 1 row affected (0.02 sec)
mysql> SET FOREIGN_KEY_CHECKS = 1;
Query OK, 0 rows affected (0.00 sec)
网友评论