Skip to content

Instantly share code, notes, and snippets.

@drogus
Last active January 27, 2021 14:16
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drogus/6718448 to your computer and use it in GitHub Desktop.
Save drogus/6718448 to your computer and use it in GitHub Desktop.
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"
@mattab
Copy link

mattab commented May 18, 2014

now mysql 5.6.17, line 5 is:

You may also manually set sql_mode to 5.6 default:

  • mysql -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'"

@morgo
Copy link

morgo commented Jul 8, 2014

May I suggest installing from the official repos (recently released): http://mysqlrelease.com/2014/05/theyre-here-official-mysql-repos-for-debian-and-ubuntu/

@BenMorel
Copy link

Thanks for the gist! I've got trouble getting it to work though:

Selecting previously unselected package mysql.
(Reading database ... 68740 files and directories currently installed.)
Unpacking mysql (from mysql-5.6.14.deb) ...
Setting up mysql (5.6.14) ...
sed: -e expression #1, char 35: unknown option to `s'
Starting MySQL
... * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

Full output here:
https://travis-ci.org/brick/geo/builds/36138495

Any idea?

@edmorley
Copy link

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.

@camelmasa
Copy link

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