Is it possible to install MySQL 5.5 or 5.6 on Ubuntu 16.04?

Yes, This is possible, but the problem occurred while installing 5.6 is

1
'mysql-server-5.6' has no installation candidate...

this is why because we didn’t add repository. But firstly you have to remove old mysql debian flag as:

Do this, First you have to remove
1
sudo rm /var/lib/mysql/debian-5.7.flag

then
1
2
3
4
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
sudo apt-get update
sudo apt install mysql-server-5.6
sudo apt install mysql-client-5.6

From these commands you can resolve mysql problem.