How can I tell if MariaDB or MySQL has been installed?

An Ubuntu upgrade (to 19.10) has messed up my database server. Currently the server is down and can not be started.

I have two folders: one is called var/lib/mysql/ and the other one is /var/lib/mysql-10.2; They have .frm..MYD, and .MYI Files.

Is there a way to determine if MariaDB or MySQL Has my database been deployed based on the contents of one of the tables?

I think it would be important to reinstall what I had worked before. I hope you can find out in one of the tables what was previously installed.

I've been trying to get the database up and running again, but to no avail.