Replaced MySQL 5.7 installed from a PPA with an official Docker image

See https://travis-ci.org/doctrine/dbal/jobs/495144274 for the PPA issue.
parent 9eef7c86
......@@ -117,7 +117,7 @@ jobs:
env: DB=mysql COVERAGE=yes
- stage: Test
php: 7.2
env: DB=mysql MYSQL_VERSION=5.7 COVERAGE=yes
env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
......@@ -133,7 +133,7 @@ jobs:
env: DB=mysqli COVERAGE=yes
- stage: Test
php: 7.2
env: DB=mysqli MYSQL_VERSION=5.7 COVERAGE=yes
env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
......
......@@ -2,21 +2,14 @@
set -ex
echo "Installing MySQL 5.7..."
echo "Starting MySQL 5.7..."
sudo service mysql stop
sudo apt-get remove "^mysql.*"
sudo apt-get autoremove
sudo apt-get autoclean
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.9-1_all.deb
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server libmysqlclient-dev
sudo mysql_upgrade
echo "Restart mysql..."
sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
sudo docker run \
-d \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=doctrine_tests \
-p 33306:3306 \
--name mysql57 \
mysql:5.7
sudo docker exec -i mysql57 bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment