@aoz so I think I might have fixed it. (Haven’t had time to check everything). Not sure if HA runs correctly, because I have other issues with my YNH server.
sudo vim /etc/mysql/my.cnf and add
[MYSQLD]
innodb_force_recovery=3
restart mariadb and it should start
then run sudo mysqlcheck --all-databases and see which db is corrupted.
backup that db, drop it, then stop mariadb server and remove sudo rm -rf /var/lib/mysql/homeassistant/ (in my case). start server again and import the backup.