The "Unable to set password" message is a bit misleading. Essentially, it just means something went wrong when trying to set the password—which can be as generic as MySQL not running.
Run systemctl status mysql.service
to find out if MySQL started up sucessfully. If it didn't, run sudo journalctl -xn
and/or check the contents of /var/log/mysql/error.log
to find out more about what's preventing it from starting.
Note that sudo apt-get purge mysql-server-5.5
will not remove config and data files. If one of them is botched, the only way to rectify this is to:
sudo apt-get purge mysql-server-5.5
sudo rm -R /etc/mysql
sudo rm -R /var/lib/mysql
sudo apt-get install mysql-server
Important: Don't do this if you have data in your MySQL installation, as this will ERASE all your MySQL data. On a fresh install, you've got nothing to lose. Otherwise, make sure you know what you're doing.