This appears to be a common problem on 12.04. I\'ve tried everthing in this thread including:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get remove
This error also happened when switching from MySQL to MariaDB (https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1490071).
The MySQL binary data files were not compatible with MariaDB so I switched back to MySQL because I did not have time to mess with mysqldump.
First I had to move MariaDB data away from /var/lib/mysql, then install MySQL and then move my original data from /var/lib/mysql-5.7 (this backup was automatically created before the error) to /var/lib/mysql.