For some time, maybe since the upgrade to Fedora 39 (KDE Workbench version) I have been getting errors while using dnf to upgrade the system. The upgrade complete, but there will be a message about not being able to connect to MariaDB 10.5. Since a reference to F38 was included, I figured this was an artifact of some sort, something that broke in the upgrade.
But today I tried invoking KMail, which failed with the complaint that the Akonadi service was disabled. Some research indicated that Akonadi relied on MariaDB, and further exploration showed that indeed MariaDB service was not running. Why?
MariaDBâs web site suggested several possible reasons for failure to start, and I tried a number of them. I have some more information but not an answer to the problem.
Invoking mariadb manually in a bash shell returns the following message:
âERROR 2002 (HY000): Canât connect to local MySQL server through socket â/var/lib/mysql/mysql.sockâ (2)â There is no such file in /var/lib/mysql visible to me, although this may be created by a process upon db startup - I canât say.
I looked in the error log in /var/log/mysql and found a message that stated:
âReferenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTERâ. I was unable to find where that option file is, but MariaDB website suggested this might be a source of difficulty.
So, the bottom line is that I have a service that is failing to start for reasons unknown. If anyone is familiar with the problem i would welcome their suggestions. Thanks.
In /var/lib/mysql are the following entries: aria_log_control, ddl_recovery-backup.log, ibdata1, multi-master.info, mysql_upgrade_info, aria_log.00000001, ib_buffer_pool, ib_logfile0 (files) and sub-directories COOKBOOK, mysql and performance_schema.
From this I conclude that the mariadb database is already initialized and that I do not need to run mariadb-prepare-db-dir. However, the service is not running and fails when invoked manually.
More research pointed to /etc/my.cnf.d/mariadb-server.cnf, which contains configuration including where to log errors:
/var/log/mariadb/mariadb.log. I consulted this file and found:
â2024-04-17 7:23:57 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.9.4.
2024-04-17 7:23:57 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-04-17 7:23:57 0 [Note] InnoDB: Starting shutdownâŚ
2024-04-17 7:23:57 0 [ERROR] Plugin âInnoDBâ registration as a STORAGE ENGINE failed.
2024-04-17 7:23:57 0 [Note] Plugin âFEEDBACKâ is disabled.
2024-04-17 7:23:57 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-04-17 7:23:57 0 [ERROR] Abortingâ
The redo log format was unrecognized, apparently. I donât know where the redo log is nor how it was created with 10.9, unless another app is creating it.
More research reveals that the redo log is created by InnoDB:
" The redo log is used by InnoDB during crash recovery and background flushing of transactions to the tablespaces. The redo log files have names like ib_logfileN , where N is an integer. From MariaDB 10.5, there is only one redo log, so the file will always be named ib_logfile0 . If the innodb_log_group_home_dir system variable is configured, then the redo log files will be created in that directory. Otherwise, they will be created in the directory defined by the datadir system variable."
I looked in /var/lib/mysql/ and found the file named ib_logfile0 which in its contents it listed 10.9. I renamed the file and invoked âsystemctl start mariadbâ. A status command revealed the service had started successfully and on checking the mysql subdirectory I found a new file ib_logfile0 had been created.
I still donât know how the 10.9 version was created.