Let me explain, let's say that you did a database backup with MySQL 5.5 , and now you have installed MySQL 5.6
If you have the database on MySQL 5.5 and MySQL 5.6 installed, this means that you overwrite database .. This is not good. All versions are different, and once this thing could cost you your entire database. Each MySQL version has a different structure, more or less.
Never overwrite folder var/db/mysql/mysql this folder should be never overwrite.
No one can know what is in your server, follow the steps above .. and come back with an answer if this problem appears. I'm pretty sure the problem is only mysql server. And to make sure that the tables are optimized for MySQL version/MariaDB that you use to run this command too. After installing the database as I said above, run this command.
// Mysql 5.6
mysql_upgrade
// mysql 5.7
mysql_upgrade -u root -p
After reboot you server. Then wait for a new crash.