Mariadb wasn't started.
Attempts to restart failed with this showing up in /var/log/mysql.err
2023-02-01 13:33:50 0 [Warning] You need to use --log-bin to make --binlog-format work.
2023-02-01 13:33:50 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-02-01 13:33:50 0 [Note] InnoDB: Number of pools: 1
2023-02-01 13:33:50 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-02-01 13:33:50 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
2023-02-01 13:33:50 0 [Note] InnoDB: Completed initialization of buffer pool
2023-02-01 13:33:50 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 20181461 between the checkpoint 20181461 and the end 20181449.
2023-02-01 13:33:50 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-02-01 13:33:50 0 [Note] InnoDB: Starting shutdown...
2023-02-01 13:33:50 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-02-01 13:33:50 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-02-01 13:33:50 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-02-01 13:33:50 0 [Warning] 'innodb-large-prefix' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
2023-02-01 13:33:50 0 [Warning] 'innodb-file-format' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
2023-02-01 13:33:50 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-02-01 13:33:50 0 [ERROR] Aborting
I deleted mv ib_logfile0 and mariadb restarted normally
However I found my sites showed corruption issues from db
I then deleted all tables within sm_portal as a test and attempted to reimport them from a backup.
This failed with error ERROR 1005 (HY000) at line 25: Can't create table sm_portal
.cm_def_media_ext
(errno: 184 "Tablespace already exists")
Searching for tablespace already exists it recommends to delete orphan tables from the CLI of the database ie;
Running: ls /var/lib/mysql/sm_portal/ -l
Showed many tables still present even through phpmyadmin showed them gone.
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 cm_def_media_ext.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 cm_def_media_properties.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 cm_def_media_types.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 cm_def_site_models.ibd
-rw-rw---- 1 mysql mysql 65 Jan 29 19:06 db.opt
-rw-rw---- 1 mysql mysql 98304 Jan 29 19:37 sm_cm_children.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_contacts.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_fb_posts.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_media_galleries.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_media.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_media_properties.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_media_symlinks.ibd
-rw-rw---- 1 mysql mysql 131072 Jan 29 19:37 sm_cm_options.ibd
-rw-rw---- 1 mysql mysql 65536 Jan 29 19:37 sm_cm_parents.ibd
-rw-rw---- 1 mysql mysql 98304 Jan 29 19:37 sm_commentmeta.ibd
-rw-rw---- 1 mysql mysql 147456 Jan 29 19:37 sm_comments.ibd
-rw-rw---- 1 mysql mysql 81920 Jan 29 19:37 sm_links.ibd
-rw-rw---- 1 mysql mysql 212992 Feb 1 13:40 sm_options.ibd
-rw-rw---- 1 mysql mysql 98304 Feb 1 13:40 sm_postmeta.ibd
-rw-rw---- 1 mysql mysql 212992 Feb 1 13:40 sm_posts.ibd
-rw-rw---- 1 mysql mysql 98304 Jan 29 19:37 sm_termmeta.ibd
-rw-rw---- 1 mysql mysql 81920 Jan 29 19:37 sm_term_relationships.ibd
-rw-rw---- 1 mysql mysql 98304 Jan 29 19:37 sm_terms.ibd
-rw-rw---- 1 mysql mysql 98304 Jan 29 19:37 sm_term_taxonomy.ibd
-rw-rw---- 1 mysql mysql 98304 Jan 29 19:37 sm_usermeta.ibd
-rw-rw---- 1 mysql mysql 114688 Jan 29 19:37 sm_users.ibd
I noticed there is also a db.opt file. Not sure if I can delete that.
ChatGPT says:
A db.opts file is a configuration file used by some database management systems. It typically contains settings and options that are used to configure the behavior of the database, such as the location of data files, the size of memory buffers, and other performance-related parameters. The exact contents and format of the db.opts file can vary depending on the specific database system that is being used.
I left db.opt file there but deleted all *.ibd files
Ran the command:
zcat mysavedexportfile.sql.gz | mysql -u 'root' -pDBpassword... targetdatabase
Worked perfectly and survived a service mariadb restart :-)