I’m moving to a new server. Did xtrabackup dump on machine 1, copied it to machine 2, prepared and restored (plus changed ownership to mysql.mysql).
All steps were successful.
But when I try to start mysqld ((mysqld 8.0.15-6) Percona Server (GPL), Release ‘6’, Revision ‘63abd08’) it tries to add foreign key constraints when starting- and fails:
2019-07-24T19:24:18.391720Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15-6) starting as process 3697
2019-07-24T19:24:37.783978Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:24:44.781040Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:24:58.140755Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:04.669351Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:10.541926Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:15.943294Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:21.444415Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:26.642749Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:36.162198Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:41.015243Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:47.724146Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:25:58.505025Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:05.443897Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:11.788815Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:18.009204Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:23.537348Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:29.695161Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:37.746838Z 2 [ERROR] [MY-013140] [Server] Failed to add the foreign key constraint. Missing index for constraint ‘fk_srv_language_grid_spr_id_grd_id’ in the referenced table ‘srv_grid’
2019-07-24T19:26:52.339164Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2019-07-24T19:26:52.340053Z 0 [ERROR] [MY-010119] [Server] Aborting
Any ideas how to make it run? Even just to fix the tables (add the missing index)?
Or is the only way to add the index on source machine, dump + copy + prepare + import again and hope that’s the only missing index?
Thanks