I installed MariaDB and failed to notice it replaces Mysql. During the install, it moved the Mysql data directory to mysql-5.7. I removed MariaDB and reinstalled Mysql and tried to restore my databases by simply moving them from mysql-5.7 to mysql and restarting Mysql. Mysql won't start again and therefore I cannot use mysqldump as suggested here - How to restore mysql databases after upgrading to mariadb. How can I restore my databases?
For reference, I am running Ubuntu Server 16.04 and Mysql 5.7.