云数据库 RDS-外键使用不规范导致实例重启失败或执行表操作报错ERROR 1146: Table 'xxx' doesn't exist:场景描述
时间:2025-02-12 15:03:34
场景描述
- 重启RDS for MySQ L实例 后,在进行表相关操作时,提示如下错误:
ERROR 1146: Table `xxx` doesn't exist
同时,在error log中可见如下记录:[Warning] InnoDB: Load table `xxx` failed, the table has missing foreign key indexes. Turn off 'foreign_key_checks' and try again. [Warning] InnoDB: Cannot open table 'xxx' from the internal data dictionary of InnoDB though the .frm file for the table exists.
- 由于外键使用不规范,导致实例重启失败,error log中可见如下错误:
[Warning] InnoDB: Load table `xxx` failed, the table has missing foreign key indexes. Turn off 'foreign_key_checks' and try again. [Warning] InnoDB: Cannot open table xxx/xxx from the internal data dictionary of InnoDB though the .frm file for the table exists.
support.huaweicloud.com/trouble-rds/rds_12_0099.html