Created
May 23, 2017 04:53
-
-
Save say8425/25f534b60a7015ae5c03506306e20052 to your computer and use it in GitHub Desktop.
Travis MySQL 5.7 installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: | |
- 2.2.5 | |
services: | |
- mysql | |
sudo: true | |
before_script: | |
- chmod +x ./travis/* | |
- ./travis/mysql-version-upgrade-5.7.sh | |
- ./travis/mysql-reset-root-password.sh | |
- ./travis/create-test-database.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Create Test Database..." | |
mysql -e 'CREATE DATABASE your_database_test;' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Reset mysql root password..." | |
sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;" | |
sudo service mysql restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Installing MySQL 5.7..." | |
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.1-1_all.deb | |
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.1-1_all.deb | |
sudo apt-get update -q | |
sudo apt-get install -q --force-yes -o Dpkg::Options::=--force-confnew mysql-server | |
sudo mysql_upgrade --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment