Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Robstar's avatar
Level 50

Codeship and MySql Version

Hi,

I'm trying Codeship again. Previously everything ran fine, with Mysql 5.6 running.

In my current app I'm using MySql 5.7 with Json columns.

Whatever I do, I can;t seem to get Codeship to use Mysql 5.7 - my build always fails when running the Laravel migrations.

I've tried adding the following to my setup script:

\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/mysql-5.7.sh | bash -s

Has anyone got this working by any chance?

Cheers

0 likes
1 reply
Robstar's avatar
Robstar
OP
Best Answer
Level 50

Omg, was just having a quick Google and came across the solution. YOu need to set the mysql binary path to use v5.7. Add the following to the setup script:

\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/mysql-5.7.sh | bash -s
export PATH=/home/rof/mysql-5.7.17/bin:$PATH
mysql --defaults-file="/home/rof/mysql-5.7.17/my.cnf" -u "${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -e "create database testing";

Source: https://mattstauffer.com/blog/testing-with-a-mysql-5-7-database-on-codeship/

Please or to participate in this conversation.