Installing MySQL 5.5.6 on Ubuntu 14.04

There is probably a better and easier way to install MySQL 5.5 on Ubuntu 14.04 Circle CI, but I just thought I would put this here in case anyone else needed it. The main issue I was having was that removing the package kept some 5.7 artifacts around that was not allowing mysql-server-5.5 to start up. That and the root password dialog until I found “export DEBIAN_FRONTEND=noninteractive”.

machine:
pre:
- sudo service mysql stop
- sudo rm -rf /etc/mysql
- sudo rm -rf /var/lib/mysql
- export DEBIAN_FRONTEND=noninteractive
&& sudo -E apt-get -y remove mysql-server
&& sudo -E apt-get -y remove mysql-community-server
&& sudo -E apt-get -y remove mysql-client
&& sudo -E apt-get -y remove mysql-common
&& sudo -E apt-get -y remove mysql-community-client
&& sudo -E apt-get -y remove mysql-apt-config
&& sudo -E apt-get -y remove libmysqld-dev
&& sudo -E apt-get -y remove libmysqlclient-dev
&& sudo -E apt-get -y remove libmysqlclient18
&& sudo -E apt-get -y remove libmysqlclient20
&& sudo -E apt-get -y autoremove
&& sudo -E apt-get -y install software-properties-common
&& sudo -E dpkg -l | grep mysql
&& sudo apt-add-repository -y ‘deb http://ppa.launchpad.net/ondrej/mysql-experimental/ubuntu precise main’
&& sudo apt-get update
&& sudo -E apt-get -y install mysql-server-5.5