Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
- "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"
- "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"
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:


Copy link

morgo commented Jul 8, 2014

May I suggest installing from the official repos (recently released):

Copy link

BenMorel commented Sep 24, 2014

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/

Full output here:

Any idea?

Copy link

edmorley commented Oct 22, 2015

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:

At least for now this does unfortunately mean giving up on the caching available with the container infra.

Copy link

camelmasa commented Feb 9, 2016

We can use MySQL 5.6 on travis now.


# travis.yml

dist: trusty
sudo: required
    - mysql-server-5.6
    - mysql-client-core-5.6
    - mysql-client-5.6

See 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