If upgrade cannot configure MySQL, then you need to run mysql_upgrade
mysql_upgrade --user=<user> --password=<password>
Make sure the data directory is rwx for the mysql user. You might also want to consider How to change Mysql data directory location
apt-get install mysql-utilities