Last active
January 27, 2021 14:16
-
-
Save drogus/6718448 to your computer and use it in GitHub Desktop.
This file contains 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
install: | |
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5" | |
- "sudo apt-get autoremove" | |
- "sudo apt-get install libaio1" | |
- "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/" | |
- "sudo dpkg -i mysql-5.6.14.deb" | |
- "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server" | |
- "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/" | |
# some config values were changed since 5.5 | |
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf" | |
- "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf" | |
- "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf" | |
- "sudo /etc/init.d/mysql.server start" |
Commenting here since this is high up in the Google results for "travis mysql 5.6".
With Travis' new Trusty infra beta, installing mysql5.6 can be done in only a couple of lines. For an example, see:
mozilla/treeherder#1080
At least for now this does unfortunately mean giving up on the caching available with the container infra.
We can use MySQL 5.6 on travis now.
e.g.
# travis.yml
dist: trusty
sudo: required
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
See https://docs.travis-ci.com/user/database-setup/#MySQL-5.6 for reference.
(@drogus Thank you for create this gist. )
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the gist! I've got trouble getting it to work though:
Full output here:
https://travis-ci.org/brick/geo/builds/36138495
Any idea?