Debian 9: After upgrade from 8, MySQL (MariaDB) does no longer work

For some reason you don't have the file /etc/mysql/debian-start, which is the error given:

16:55:25 doraemoe systemd[6859]: mariadb.service: Failed at step EXEC spawning /etc/mysql/debian-start: No such file or directory

I have checked my installation of mariadb and that file is part of the mariadb-server-10.1 package. Check whether there is /etc/mysql/debian-start.dpkg-dist or similar, if so rename that to /etc/mysql/debian-start.

Otherwise, check what exact package name you have installed:

dpkg -S /usr/bin/mysqld_safe

mariadb-server-10.1: /usr/bin/mysqld_safe

Download the package .deb (e.g. via this page), unpack it:

dpkg-deb --extract mariadb-server-10.1_10.1.26-0+deb9u1_amd64.deb /tmp/mariadb-server

(substitute the name of the file you downloaded) and then copy the file:

cp /tmp/mariadb-server/etc/mysql/debian-start /etc/mysql/

You should then be able to start it; unless there are more files missing. It's strange, that this file should be missing so something went wrong at some stage.