MySQL service not starting post upgrade to M&R 7.7.0.X. Below error is seen in MySQL .err log file:
2024-10-15T11:55:49.007714+01:00 1 [System] [MY-011012] [Server] Starting upgrade of data directory. 2024-10-15T11:55:49.007765+01:00 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2024-10-15T11:55:49.375920+01:00 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation. 2024-10-15T11:55:49.375959+01:00 1 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified. 2024-10-15T11:55:49.375985+01:00 1 [ERROR] [MY-012216] [InnoDB] Cannot open datafile for read-only: './mysql/help_relation.ibd' OS error: 71 2024-10-15T11:55:49.376006+01:00 1 [Warning] [MY-012019] [InnoDB] Ignoring tablespace `mysql/help_relation` because it could not be opened. 2024-10-15T11:55:49.433961+01:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2024-10-15T11:55:49.867024+01:00 1 [ERROR] [MY-011006] [Server] Got error 197 from SE while migrating tablespaces. 2024-10-15T11:55:49.871119+01:00 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2024-10-15T11:55:49.871159+01:00 0 [ERROR] [MY-010119] [Server] Aborting 2024-10-15T11:55:51.383698+01:00 0 [System] [MY-010910] [Server] /opt/APG/Databases/MySQL/Default/bin/mysqld: Shutdown complete (mysqld 8.0.35) MySQL Community Server - GPL.
M&R 7.7.0.X
When M&R 7.2 is installed help_relation.ibd file is not present under APG_HOME/Databases/MySQL/Default/data/mysql/
and when M&R is upgraded from 7.2 to 7.7 in two step process MySQL service does not start because in M&R 7.7 MySQL 8.0.35 upgrades the data directory on startup, which checks for all the data files availability for each table.
As a workaround, use/copy help_relation.ibd file from the M&R version 7.4.1.X or 7.5.0.X based on the upgrade path chosen to APG_HOME/Databases/MySQL/Default/data/mysql/
.
For example in the second step of upgrade process:
1). If upgrading from M&R 7.4.1.X to 7.7.0.X use help_relation.ibd file of M&R 7.4.1.X.
2). If upgrading from M&R 7.5.0.X to 7.7.0.X use help_relation.ibd file of M&R 7.5.0.X.
NOTE:
1). help_relation.ibd file from both M&R 7.4.1.1 or 7.5.0.3 is attached to this KB.
2). Ensure to rename the attached file as help_relation.ibd post placing it in APG_HOME/Databases/MySQL/Default/data/mysql/
folder.
3). Ensure that permissions/ownership of help_relation.ibd file is same as the other files in this folder.