Ok, I found out how to reinstall MySQL 5.6 in the default Travis CI container.
Here's what you need in .travis.yml :
services: - mysql sudo: true before_script: - bash .travis.install-mysql-5.7.sh
And here .travis.install-mysql-5.7.sh (edited thanks to @codyzu's answer):
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections wget https://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb sudo dpkg --install mysql-apt-config_0.7.3-1_all.deb sudo apt-get update -q sudo apt-get install -q -y --allow-unauthenticated -o Dpkg::Options::=--force-confnew mysql-server sudo mysql_upgrade
I hope this helps anyone who is facing the same problem!
Philippe carle
source share