Charset issue with mysql 5.6

mysql
circle.yml

#1

Hi there,

So I’ve just installed mysql 5.6 for my builds (following this article). Right after that I ran my tests. And some unicode/mysql-related tests failed with the following error message:

(ORM is Django)

OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")

Now I found out how to fix that issue (I did it locally and it works) but I don’t know how to do it on your servers. I tried to ssh a build and edit /etc/mysql/my.cnf but of course it didn’t work. Is there a simple way to do that?

Thanks :slightly_smiling:


#2

Comparing the current configuration with the one in the blog post, it looks you only need to modify collation-server ? Something like the following should work.

machine:
  pre:
    - sudo sed -i 's/collation-server = utf8_unicode_ci/collation-server=utf8_general_ci/' /etc/mysql/my.cnf

#3

Ok nice I’ll try asap. I’m wondering, are you planning to enhance that kind of configuration tweak?


#4

I actually fixed it by changing the installation instructions of mysql-server 5.6 to keep the old config (the default one you have, that keeps utf8 everywhere):

machine:
  pre:
    - sudo apt-get update; sudo DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes -y mysql-server-5.6

#5

Hi @kimh,

The main issue with doing this, is that don’t benefit from caching. And this adds 45seconds to a build that is already ~20minutes. Do you plan to propose this version (any version of 5.6 would be ok) by default on your machines soon? By default I mean the same way as we choose a version for NodeJS for instance.

Thanks :slightly_smiling:


#6

@m-vdb

We are now rolling out Ubuntu 14.04 for our beta users where MySQL 5.6 is installed. If you are interested, you can reach our support so that you can try.


#7

Interesting! Do you have an idea of the production roll out?


#8

@m-vdb

We started rolling out Trusty for our beta users since the last week. Can you checkout When are we going to get Ubuntu 14.04? ?


#9

thanks @kimh :slight_smile: My teammate @asiebert will take care of it!


#10