So appdata is only present on your cache, that's good and your mariaDB path is OK. And you are right, moving from a share (/mnt/user) directly to a disk is a bad idea. Always copy share to share or disk to disk.
Have you tried installing MariaDB to a new appdata like /mnt/cache/appdata/mariadb2, verify that this works, stop the container, copy the content of the mariadb dir to the mariadb2 dir, pray a bit and start it back up? Without real backup, that's the only thing I can think of.